A NuGet package. It aim is to help you write extendable and command-based console programs in C# and .Net. https://www.craigoates.net/Software/Project/7
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
4.5 KiB

# Summary
Console.Waterworks is a NuGet package. It aim is to help you write extendable and command-based console programs in C# and .Net.
Amongst other things, Console.Waterworks allows you to write (command-)methods which become run-time commands. Console.Waterworks, also, parses end-user input for you and handles bad input and method parameters too.
If none of what I just said made no sense, hopefully the images below will help explain what Console.Waterwork is and how it works.
**Good Input Data Flow**
![Example 1](.attachments/Images/Valid_Input.png "Valid input diagram")
**Bad Input Data Flow**
![Example 3](.attachments/Images/Invalid_Input.png "Invalid input diagram")
---
**Code Example - Good Input**
![Example 2](.attachments/Images/Method_Mapping.gif "Method mapping example -- valid")
**Code Example - Bad Input**
![Example 4](.attachments/Images/Method_Mapping_Invalid.gif "Method mapping example -- invalid")
Within this repository is three projects within one Visual Studio solution. Those projects are as follows:
1. Console.Waterworks
2. CW_Console
3. CW_Tests
## Disclaimer
Console.Waterworks is based on the [ConsoleApplicationBase](https://github.com/TypecastException/ConsoleApplicationBase "ConsoleApplicationBase GitHub Repository") repository by [TypecastException](https://github.com/TypecastException "TypecastException's GitHub Profile").
## Pre-Requisites
To use Console.Waterworks, I recommend you meet the following pre-requisites:
- You have experience with [C#](https://docs.microsoft.com/en-us/dotnet/csharp/).
- You can create a [.Net console program](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/hello-world-your-first-program) in [Visual Studio 2017](https://www.visualstudio.com/vs/).
- You have experience with [Nuget](https://www.nuget.org/).
- You have Microsoft [.Net Framework 4.7](https://docs.microsoft.com/en-us/dotnet/framework/install/guide-for-developers) or higher.
## Console.Waterworks (Library/NuGet Package)
This is a traditional .Net 4.7 library I wrote in C#. This is what you will add to your project when you want to add the features of this codebase into yours. To add it to your project, use the following command in your Package-Manager console (assuming Visual Studio),
7 years ago
```powershell
// Make sure you change the version number to match the one you want.
Install-Package Console.Waterworks -Version 1.0.0.2
7 years ago
```
If you are using the .Net CLI, use the following command,
```powershell
// Again, make sure you change the version number to the one you want.
dotnet add package Console.Waterworks --version 1.0.0.2
```
For more information, please use the following links:
- [Console.Waterworks Wiki](https://git.abbether.net/craig.oates/Console.Waterworks/wiki)
- [NuGet Profile Page](https://www.nuget.org/packages/Console.Waterworks/)
## CW_Console
This is a traditional .Net console program which provides a working example of how Console.Waterworks works. You can use this as a reference to help you familiarise yourself with how to add/use Console.Waterworks to/with your project. This is written in C#.
## CW_Tests
This is a .Net library which houses the solution's unit tests. This is written in C# and uses xUnit as its testing framework/library/situation/whatever-you-want-to-call-it.
## About the Creator
Hi, my name is Craig and I'm the creator of Console.Waterworks. Thanks for checking it out.
- Email: [craig@craigoates.net](mailto:craig@craigoates.net)
- Web: [craigoates.net](http://www.craigoates.net)
- Project's Site: [craigoates.net/Software/project/7](https://craigoates.net/Software/project/7)
## A Note About Console.Waterworks.Core
When I started this project, the .Net Framework was its infancy with its switch to .Net Core. Because of this, I created a separate .Net Core version of this project for those wanting to use it with Core. If you decide to use the Core version, you will find it operates the exact same way as this one. So, learning how one works means you know how to use both. This is why the I have reduced the wiki for the Console.Waterworks.Core wiki to basic guidance on how to **use** it. If you want to know how the projects are built, you will need to use **this** repository's wiki.
If you are interested in using Console.Waterworks.Core, you can use the following links:
- [Console.Waterworks.Core Repository](https://git.abbether.net/craig.oates/Console.Waterworks.Core/)
- [Console.Waterworks.Core Wiki](https://git.abbether.net/craig.oates/Console.Waterworks.Core/wiki)