fix broken image-links.

master
Craig Oates 4 years ago
parent
commit
0fd7c205d2
  1. 2
      Adding-Console.Waterworks-to-Your-Project.md
  2. 6
      CW_Console-Flow.md
  3. 4
      CW_Console-Project-Breakdown.md
  4. 4
      CW_Tests-Project-Breakdown.md
  5. 4
      Console.Waterworks-Flow.md
  6. 2
      Console.Waterworks-Overview.md
  7. 8
      Console.Waterworks-Project-Breakdown.md
  8. 2
      Overview-of-Command-Methods.md
  9. 6
      Referencing-Other-Projects-in-Yours-when-Using-Console.Waterworks.md
  10. 4
      Repository-Breakdown.md
  11. 2
      Unit-Tests-Overview.md
  12. 4
      Using-CW_Console.md
  13. 2
      Using-the-Help-Attributes.md
  14. 6
      Wiring-Console.Waterworks-into-Your-Project.md
  15. 6
      Writing-Command-Methods.md
  16. 2
      _Sidebar.md
  17. 0
      assembly-info-screenshot.png
  18. 0
      command-methods-overview.png
  19. 0
      console-library-relationship.png
  20. 0
      console.waterworks-assembly-info.png
  21. 0
      console.waterworks-basic-data-flow.png
  22. 0
      console.waterworks-data-flow.png
  23. 0
      console.waterworks-internal-data-flow.png
  24. 0
      console.waterworks-project-breakdown.png
  25. 0
      console.waterworks-selected.png
  26. 0
      consolecommands-library-binding.png
  27. 0
      cw_console-data-flow-bad-input.png
  28. 0
      cw_console-data-flow.png
  29. 0
      cw_console-file-structure.png
  30. 0
      cw_console-run-time-start.png
  31. 0
      cw_console-selected.png
  32. 0
      cw_tests-file-structure.png
  33. 0
      cw_tests-selected.png
  34. 0
      invalid-arguments-input.gif
  35. 0
      invalid-command-input.gif
  36. 0
      method-mapping.gif
  37. 0
      no-assembly-info-screenshot.png
  38. 0
      nuget-package-manager-screenshot.png
  39. 0
      project-references.png
  40. 0
      run-time-help.gif
  41. 0
      sidebar-banner.png
  42. 0
      solution-overview.png
  43. 0
      visual-studio-test-explorer.png
  44. 0
      wetpancake-overview.png

2
Adding-Console.Waterworks-to-Your-Project.md

@ -13,7 +13,7 @@ dotnet add package Console.Waterworks --version 1.0.0.2
If you are using the NuGet Package Manager in Visual Studio, you can search for C.W. and install it from there. If you do that, your Visual Studio should look similar to the image below.
![nuget package manager gui](attachments/nuget-package-manager-screenshot.png)
![nuget package manager gui](nuget-package-manager-screenshot.png)
You can find more information about C.W. on NuGet's website. If you would like to do that, use the following links:

6
CW_Console-Flow.md

@ -1,6 +1,6 @@
To help you get up to speed with how CW_Console works, please conside the image below.
![cw_console data flow](attachments/cw_console-data-flow.png)
![cw_console data flow](cw_console-data-flow.png)
The way it works is as follows:
@ -10,8 +10,8 @@ The way it works is as follows:
That's the "happy path" version at least. If the end-user enters an invalid command, C.W. will return an error message.
![cw_console bad input data flow](attachments/cw_console-data-flow-bad-input.png)
![cw_console bad input run-time example](attachments/invalid-command-input.gif)
![cw_console bad input data flow](cw_console-data-flow-bad-input.png)
![cw_console bad input run-time example](invalid-command-input.gif)
For C.W. to operate as designed, it needs to rely on certain things, which are;

4
CW_Console-Project-Breakdown.md

@ -1,4 +1,4 @@
![cw_console selected project](attachments/cw_console-selected.png)
![cw_console selected project](cw_console-selected.png)
This project is a traditional .Net 4.7 console program, written in C#. Within it, you will find one folder and six files. Having said that, you will spend most of your time in one file, called "ConsoleCommands.cs". This is after you have grasped what is happening in  "Program.cs", though.
@ -16,7 +16,7 @@ The links for these files are as follows:
* [Program.cs](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW_Console/Program.cs)
* [ConsoleCommands.cs](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW_Console/ConsoleCommands.cs)
![cw_console file structure](attachments/cw_console-file-structure.png)
![cw_console file structure](cw_console-file-structure.png)
"Program.cs" is the entry point into the system -- it is where `Main` resides. The purpose of `Main` in this context is to set-up in "input-loop", using Console.Waterworks. Once you have grasped what/how it is doing that, you should never need to go back in this folder.

4
CW_Tests-Project-Breakdown.md

@ -1,4 +1,4 @@
![cw_tests project selected](attachments/cw_tests-selected.png)
![cw_tests project selected](cw_tests-selected.png)
This is a traditional .Net 4.7 library, written in C#. Its main purpose is to house the solution's unit tests.
@ -9,4 +9,4 @@ Within the project, you will see four files and a folder. Of the four files, you
* [CW_Tests.csproj](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW_Tests/CW_Tests.csproj)
* [packages.config](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW_Tests/packages.config)
![cw_tests file structure](attachments/cw_tests-file-structure.png)
![cw_tests file structure](cw_tests-file-structure.png)

4
Console.Waterworks-Flow.md

@ -1,6 +1,6 @@
To help you get up to speed on the way Console.Waterworks (C.W.) works, please view the image below.
![console.waterworks basic data flow](attachments/console.waterworks-basic-data-flow.png)
![console.waterworks basic data flow](console.waterworks-basic-data-flow.png)
The way it works is as follows:
@ -16,7 +16,7 @@ If you are unsure what the methods in `CW_Liaison` do, use Visual Studio's intel
Below is a more detailed version of the image above.
![console.waterworks detailed data flow](attachments/console.waterworks-internal-data-flow.png)
![console.waterworks detailed data flow](console.waterworks-internal-data-flow.png)
One of the main stays of C.W. is how it controls the flow of data. It tries to maintain a high degree of consistency and reduce "cross-pollination". What I mean by that is C.W.  tries to manage how, when and where the data flows via its `CoOrdinator` class. Each "specialist" class only deals with the `CoOrdinator`. They (specialists) do not call methods to/from each other. If one specialist needs information from another, it must go through the `CoOrdinator`. If you are someone new to the project, I am hopeful this consistency will help you learn the system quicker. With that said, there are a several places where this pattern is not applied. They are when you are dealing with `CW_Logger`, `CW_Constants` and the "attribute" classes. These classes are accessible throughout the whole system. So, you can call them whenever/wherever you want. They are not accessible outside the project, though. In other words, you can only do this when working within this project's source code and not when you are **consuming** C.W. as a NuGet package.

2
Console.Waterworks-Overview.md

@ -1,3 +1,3 @@
Console.Waterworks (C.W.) is a NuGet package. I wrote it in C# with the intension of using it to make console programs. The main feature it provides is a way to make command-based (MVC?) console programs. It does this by parsing input from the end-user and mapping it to a particular "command-method". C.W., also, manages the error-handling which allows you to focus on writing your "business logic". Another way to look at it is C.W. provides the "plumbing code".
![Console.Waterworks Data-Flow](attachments/console.waterworks-data-flow.png)
![Console.Waterworks Data-Flow](console.waterworks-data-flow.png)

8
Console.Waterworks-Project-Breakdown.md

@ -1,8 +1,8 @@
![console-waterworks selected](attachments/console.waterworks-selected.png)
![console-waterworks selected](console.waterworks-selected.png)
This project is a .Net 4.7 library, written in C#. Within the project, you will see eight folders and eighteen files in total. The layout of these files and folders are shown in the image below.
![console.waterworks project overview](attachments/console.waterworks-project-breakdown.png)
![console.waterworks project overview](console.waterworks-project-breakdown.png)
Before going into further detail...  If you want to jump straight into the code, [CW_Liaison.cs](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/Console.Waterworks/CW_Liaison.cs) is the place to start. It is the entry point to the library when using it in a project.
@ -98,8 +98,8 @@ The next specialist is the `HelpSpecialist`. This one handles the organising of
The `ProgramInfoSpecialist` provides information about the console program at run-time. If you would like to change what it shows when the console program starts, you can do it in two places. The first is to hard-code it in here but this would not be my first choice. The second place is to use the information "Assembly Information". You can find this by opening up the projects properties page which you can see in the image below.
![console.waterworks assembly info.](attachments/console.waterworks-assembly-info.png)
![console.waterworks assembly info.](console.waterworks-assembly-info.png)
I ran through a lot of information there and at a brisk pace. So, to help with the information overload, here is an illustration to help breakdown it down.
![console.waterworks data flow](attachments/console.waterworks-internal-data-flow.png)
![console.waterworks data flow](console.waterworks-internal-data-flow.png)

2
Overview-of-Command-Methods.md

@ -2,4 +2,4 @@ There is nothing special about command-methods. They are nothing more than the m
Here is a diagram to help show the "position" of the command-methods within the project.
![command-methods overview](attachments/command-methods-overview.png)
![command-methods overview](command-methods-overview.png)

6
Referencing-Other-Projects-in-Yours-when-Using-Console.Waterworks.md

@ -9,13 +9,13 @@ Within Wet Pancake is a .Net Standard Library (written in F#) and a .Net 4.7 con
For the sake of completeness, here is a quick overview of Wet Pancakes' set-up.
![wet pancake overview](attachments/wetpancake-overview.png)
![wet pancake overview](wetpancake-overview.png)
In more generic terms, here are a couple of diagrams to help explain where/how C.W. slots into your project.
![multi-library referencing example](attachments/consolecommands-library-binding.png)
![multi-library referencing example](consolecommands-library-binding.png)
![library referencing example](attachments/console-library-relationship.png)
![library referencing example](console-library-relationship.png)
An important note to make is your must call the code from another library **inside** the command-methods.

4
Repository-Breakdown.md

@ -8,8 +8,8 @@ All three projects are written in C#.
The solution's main project is the .Net 4.7 library, called Console.Waterworks. This is where you will most likely want to start your exploration of the code-base. The other two are secondary but important parts of the solution. Their names are CW_Console and CW_Tests. To help you grasp what that looks like, please consider the following image.
![solution overview](attachments/solution-overview.png)
![solution overview](solution-overview.png)
The image below shows how each project is referenced within the solution. Console.Waterworks and CW_Console are referenced in CW_Tests; And, Console.Waterworks is referenced in CW_Console. This leaves Console.Waterworks referencing none of the other two.
![project references](attachments/project-references.png)
![project references](project-references.png)

2
Unit-Tests-Overview.md

@ -5,7 +5,7 @@ Within "CW_Tests", you will find a collection of unit tests -- which I wrote wit
It is worth pointing out CW_Tests uses xUnit's Test Runner for Visual Stuio which means you can use Visual Studio's Test Explorer. This allows you to see the project's (unit) tests with a graphical user interface. If you are unsure what that is, below is a screenshot of it looks like.
![visual studio test explorer](attachments/visual-studio-test-explorer.png)
![visual studio test explorer](visual-studio-test-explorer.png)
As you can see, it is a good way to determine what tests are passing and failing. On top of that, it highlights how I have organised the tests (in CW_Tests).

4
Using-CW_Console.md

@ -4,11 +4,11 @@ To operate CW_Console, you enter commands and its required arguments into the co
When you start the console, you will see something similar to the image below.
![cw_console start screen](attachments/cw_console-run-time-start.png)
![cw_console start screen](cw_console-run-time-start.png)
From here, you can begin entering commands. Before continuing, it is worth noting the "Help" command. When you enter `Help` into the console prompt, the console will show you a list of all the commands the program can run.
![run-time help section](attachments/run-time-help.gif)
![run-time help section](run-time-help.gif)
If you would like to view the source code of the commands, you can peruse through them all using the following link:

2
Using-the-Help-Attributes.md

@ -1,6 +1,6 @@
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 (C#/.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 CW_Console (press F5) 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.
![screenshot of help at run-time](attachments/run-time-help.gif)
![screenshot of help at run-time](run-time-help.gif)
There are four attributes in total. They are:

6
Wiring-Console.Waterworks-into-Your-Project.md

@ -69,17 +69,17 @@ namespace CW_Console // This will be different to yours.
If all has gone well, your program should run (press F5) and when you enter "Test" into the console, you should see something similar to the image below.
![successful c.w. set-up screenshot](attachments/method-mapping.gif)
![successful c.w. set-up screenshot](method-mapping.gif)
Within the `Main` function is a method called `Run`, which takes two arguments. The first is the name-space of the `ConsoleCommands` class and the second one is a `bool`. In the example above, I have used `true` but I could have used `false` if I wanted. The reason I used `true` is because I prefer my console programs to display its assembly information when I run it. If you prefer just the prompt, change the `true` variable to `false`. If all has gone well, you should see something similar to the screenshots below.
**Console program, displaying its assembly information.**
![assembly info screenshot](attachments/assembly-info-screenshot.png)
![assembly info screenshot](assembly-info-screenshot.png)
**Console program, displaying just the prompt.**
![no assembly info screenshot](attachments/no-assembly-info-screenshot.png)
![no assembly info screenshot](no-assembly-info-screenshot.png)
I will not go into too much detail about changing a project's assembly information because there is already an amble amount of information on the subject. Instead, I will provide the following links to get to started:

6
Writing-Command-Methods.md

@ -27,13 +27,13 @@ More examples can be found at the following links:
What is important to note here is the importance of the command-method names. The names you use are the exact same commands your end-user will enter at run-time. The console's input is, also, case-sensitive. This means you can have two command-methods called `Test` and `test` and have them do different things.
![screenshot of command-method and console commands](attachments/method-mapping.gif)
![screenshot of command-method and console commands](method-mapping.gif)
Another feature of C.W. is it parses and coerces input arguments. This means your command-methods can include arguments and C.W. takes care of the error-handling and messaging for you.
![screenshot of error-handling 1](attachments/invalid-command-input.gif)
![screenshot of error-handling 1](invalid-command-input.gif)
![screenshot of error-handling 2](attachments/invalid-arguments-input.gif)
![screenshot of error-handling 2](invalid-arguments-input.gif)
To be clear, there are limits to the amount of types you can use with your command-methods. For a full, list of all the coercion types, please refer to the Coercion Types List in the "As Source Code" section. The link for it is as follows:

2
_Sidebar.md

@ -1,4 +1,4 @@
![sidebar banner](attachments/sidebar-banner.png)
![sidebar banner](sidebar-banner.png)
## Table of Contents

0
attachments/assembly-info-screenshot.png → assembly-info-screenshot.png

Before

Width:  |  Height:  |  Size: 230 KiB

After

Width:  |  Height:  |  Size: 230 KiB

0
attachments/command-methods-overview.png → command-methods-overview.png

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 100 KiB

0
attachments/console-library-relationship.png → console-library-relationship.png

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

0
attachments/console.waterworks-assembly-info.png → console.waterworks-assembly-info.png

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

0
attachments/console.waterworks-basic-data-flow.png → console.waterworks-basic-data-flow.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
attachments/console.waterworks-data-flow.png → console.waterworks-data-flow.png

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

0
attachments/console.waterworks-internal-data-flow.png → console.waterworks-internal-data-flow.png

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

0
attachments/console.waterworks-project-breakdown.png → console.waterworks-project-breakdown.png

Before

Width:  |  Height:  |  Size: 220 KiB

After

Width:  |  Height:  |  Size: 220 KiB

0
attachments/console.waterworks-selected.png → console.waterworks-selected.png

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

0
attachments/consolecommands-library-binding.png → consolecommands-library-binding.png

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

0
attachments/cw_console-data-flow-bad-input.png → cw_console-data-flow-bad-input.png

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

0
attachments/cw_console-data-flow.png → cw_console-data-flow.png

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
attachments/cw_console-file-structure.png → cw_console-file-structure.png

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

0
attachments/cw_console-run-time-start.png → cw_console-run-time-start.png

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
attachments/cw_console-selected.png → cw_console-selected.png

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

0
attachments/cw_tests-file-structure.png → cw_tests-file-structure.png

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

0
attachments/cw_tests-selected.png → cw_tests-selected.png

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

0
attachments/invalid-arguments-input.gif → invalid-arguments-input.gif

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

0
attachments/invalid-command-input.gif → invalid-command-input.gif

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

0
attachments/method-mapping.gif → method-mapping.gif

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

0
attachments/no-assembly-info-screenshot.png → no-assembly-info-screenshot.png

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

0
attachments/nuget-package-manager-screenshot.png → nuget-package-manager-screenshot.png

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

0
attachments/project-references.png → project-references.png

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

0
attachments/run-time-help.gif → run-time-help.gif

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

0
attachments/sidebar-banner.png → sidebar-banner.png

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

0
attachments/solution-overview.png → solution-overview.png

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

0
attachments/visual-studio-test-explorer.png → visual-studio-test-explorer.png

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 216 KiB

0
attachments/wetpancake-overview.png → wetpancake-overview.png

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Loading…
Cancel
Save