As an aside, the term command-methods is a C# quirk. I am aware F# is more precise with its use of "method" and "function". But, "command-methods" were already established before I began learning F#. So, I am using "command-methods" to remain consistent with the main C.W. repositories and terminology. I am well aware "command-functions" is a more accurate description.
@ -4,11 +4,11 @@ To help get a feel for how Console.Waterworks (C.W.) based projects looks when u
If you look in the Solution Explorer, in Visual Studio, you will see four projects. Two of them are console programs and the other two are libraries. Each library is paired with a console project. So, in-effect, there are two "projects". Although, there is really on one project. This is because the "two" projects are different flavours on .Net. They both do the same thing, but target different environments. (.Net is in a bit of a mess at the time of writing this.)
Feel free to focus on either the .Net or .Net Core "projects". They both mirror each other so, if you learn one, you learn the other. The only reason I included both was for the sake of completeness. The important thing to take away, here, is the console-to-library relationship.
If we wanted to be more exact about the relationship, `ConsoleCommands` is bound to `FunkyFish` (or `FunkyFishCore`). And you can see this in the repositories code.
@ -52,7 +52,7 @@ namespace Commands
String.Format("Result: {0}", LibraryTest3 name) // Library Call to FunkyFish.
To help users discover features within your console program, Console.Waterworks (C.W) provides a run-time "help" section. It does this by using the (F#/.Net) attributes you attach to your command-methods. It is, also, optional. So, you do not need to decorate your command-methods if you do not want to. If you have cloned this repository, you can see this in action. To do so, run either of the two console programs and enter "help" into the prompt. You should see a list of available commands, a description of what they do and how to use them.
@ -39,11 +39,11 @@ As an aside, you can name the "ConsoleCommands.fs" file anything you like. This
With everything set-up, you can now run the program. When you do, it will await your input. If you type "test" into the prompt and press ENTER, you should see "You have set-up Console.Waterworks". And with that, you are ready to start building out your "business logic".
@ -24,13 +24,13 @@ More examples can be found at the following links:
What is important to note here is the command-methods name. This is what the end-user must enter at run-time to execute said command-method. The input is, also, case-sensitive. So, if you wanted to, you could use `test` and `Test` as seperate command-methods.
Another feature of C.W. is it parses and coerces input arguments. This means your command-methods can include arguments. C.W. takes care of the error handling and messaging too.
To be clear, there are limits to the amount of types you can use with you command-methods. For a full list of all the coercion types, please refer to the [**Coercion Types List**](https://git.abbether.net/craig.oates/Console.Waterworks/wikis/Coercion-Types-List) in the main C.W. wiki.