master
Craig Oates 4 years ago
parent
commit
697746145e
  1. 31
      CW-Console-Project-Breakdown.md

31
CW-Console-Project-Breakdown.md

@ -1 +1,30 @@
Welcome to the Wiki.
![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.
The following files are standard C# files in a Visual Studio (console) project:
* [App.config](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW-Console/App.config)
* [CW-Console.csproj](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW-Console/CW-Console.csproj) (the ".csproj" bit is the standard part)
* [packages.config](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW-Console/packages.config)
* [AssemblyInfo.cs](https://git.abbether.net/craig.oates/Console.Waterworks/blob/master/Console.Waterworks/CW-Console/Properties/AssemblyInfo.cs) (residing in the "Properties" folder)
With these files being standard files, in a typical C# project, I will not spend any time of them. What I will do instead is focus on the project specific files. If you are more interested with jumping straight into the code, start at "Program.cs". then move onto "ConsoleCommands.cs".
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](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.
"ConsoleCommands.cs" houses the all the command-methods. The methods you write in here are what the end-user will need to type into the console to execute said methods. It is important to note the end-user must match the command-method name exactly. For example, if you name one of your command-methods `Request-Data`, the end-user must enter "Request-Data" into the console -- "requestdata" and "request-data" will not work.
As an aside, "Command-method" is a term specific to this project. They are regular methods which live in "ConsoleCommands.cs". I call them that to help differentiate them from other methods throughout the system. Feel free to ignore this term or call them whatever makes sense to you.
More information about command-methods is available at the following links:
* [Overview of Command-Methods](https://git.abbether.net/craig.oates/Console.Waterworks/wikis/Overview-of-Command-Methods)
* [Writing Command-Methods](https://git.abbether.net/craig.oates/Console.Waterworks/wikis/Writing-Command-Methods)

Loading…
Cancel
Save