7 CLI Project Breakdown
Craig Oates edited this page 4 years ago

wetpancakecli project selected

The project's main purpose is to expose the features in WetPancake (the NuGet package) to those not wanting to writing code.

WetPancakeCLI is a traditional .Net (4.7) console program, written in C#. Having said that, there are part which reference F#-specific code. So, if you have not worked with F# before, there might be some lines of code which look a little unusual. If you would like to know more about my language/design choices, you can do so by using the following link:

If the idea of mixing C# and F# is off-putting for you, do not worry. I have isolated the F# parts and provided comments in the code to help you spot and work with it. Having said that, if you have no F# experience, working with the other two projects is most likely out of the question.

Within WetPancakeCLI, you will see six files and two folders.

"Packages.config", "WetPancakeCLI.csproj" and "App.config" are all standard files found within a Visual Studio project like this. I can, also, say the same for the "Properties" folder and its contents, which is a file called "AssemblyInfo.cs". Therefore, I will not spend too much time on them. If are you are new to .Net, C# or programming in-general, I recommend the following links:

Note: While the "logo.ico" file/icon is relevant, it is also a fixed asset. Because I have already created it and added it to the project, it does not need modifying. For the sake of clarity, it is the icon you see in the task bar and File Explorer.

This leaves "ConsoleCommands.cs", "Program.cs" and the contents in "ProductInfo" -- which is a file called "quick-guide.pdf".

wetpancakecli file structure

ConsoleCommands.cs

This file houses the command-methods and is the dominant file within the project. Once you understand what is happening in Program.cs, you will spend most -- if not all -- your time in here. The same is true for "quick-guide.pdf".

You will call into the WetPancake (NuGet) project from this file.

You can read the source code for this file at the following link:

Program.cs

This file is the entry-point into WetPancakeCLI. In here, you will find main and the code which creates the input-loop (at run-time). It is a small file so you should grasp what it is doing fairly quickly.

You can read the source code for this file at the following link:

quick-guide.pdf

This is the "cheat sheet" which is saved to the user's desktop when the QuickGuide command is entered (at run-time). It is a document which lists out all the WetPancakeCLI run-time commands. In other words, it is the A.P.I.

You can read the file by using the following link: