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.
Craig Oates 6bad3f6085 Updated comments in Command.cs. 7 years ago
Console.Waterworks Updated comments in Command.cs. 7 years ago
.gitattributes Added projects to the solution. 7 years ago
.gitignore Added projects to the solution. 7 years ago
CODE_OF_CONDUCT.md Added the Code of Conduct. 7 years ago
CONTRIBUTING.md Create CONTRIBUTING.md 7 years ago
LICENSE Initial commit 7 years ago
PULL_REQUEST_TEMPLATE.md Added the Pull Request Template 7 years ago
README.md Edit to README. 7 years ago

README.md

Console.Waterworks - This is incomplete

Console.Waterworks is a Nuget package. It aims to help you write extendable and command-based console programs in C# and .Net. One of the main struggles with writing software is the need to write "plumbing code". It is the code which does not solve the main problem but it is necessary for us to reach a solution. This is why we all feel frustrated when we need to write it. It feels like we are going the long way round to that dream holiday in the sun. This is why I created Console.Waterworks. I believe we should face frustration when it finds us and only then. Why go looking for it?

Amongst other things, Console.Waterworks has this one very handy trick. It allows you to write methods which become a run-time command -- which is quite the time saver. When you use Console.Waterworks, you, also, do not need to parse end-user input. The reason why is because Console.Waterworks does it for you. This means, when people run your program, they type the method name in and your code begins excuting. On top of that, Console.Waterworks handles bad input and method parameters, as well.

Do not panic if none of what I just said made no sense. I threw a lot of information at you in a short span of time. It is okay and not unexpected. Because of this, I have prepared a gif showing Console.Waterworks in action. Please feel free to check it out. It should help explain what Console.Waterwork is and how it works.

Insert gif here

Pre-Requisites

To use Console.Waterworks, I recommend you meet the following pre-requisites:

  • You have experience with C#.
  • You can create a .Net console program in Visual Studio 2017 or Visual Studio Code.
  • You have experience with Nuget.
  • You have Microsoft .Net Framework 4.7 or higher.

Quick Start

Before continuing... I am skipping the part about creating a .Net console program. This is because I assume you know to do that. I am, also, assuming you are using Visual Studio 2017 and C# (and not VB or F#).

1 Add Console.Waterworks to your project via Nuget. You can do this using Visual Studio's (2017) Package Manager GUI. Or, you can use the Package Manager Console. Here is the command for the PM Console,

Install-Package Console.Waterworks -Version 0.1.0-alpha1

2 Create a class called ConsoleCommands. It can go anywhere as long as it is in the same project as the console program project.

3 Make a note of the ConsoleCommands namespace.

4 Head to the Main method is Program.cs and add the following lines of code,

public static void Main(string[] args)
{
    CW_Liaison bob = new CW_Liaison();
    bob.Run("CW_Console", true);
}

5 Head back to ConsoleCommands and make it public.

6 Stay in ConsoleCommands and write the following line,

public static string Test()
{
    return "Congratulations! It works.";
}

7 Run the program and type "Test" into the console.

8 If all has gone well, you should see the “Congratulations! It works." message.

9 Add more methods to you console program.

Guides

There are several guides for Console.Waterworks and in various forms. I am hopeful you will find at least one of them helpful.

Offline

I have created two guides for offline usage:

  • The Quick Guide to Console.Waterworks
  • The Complete Guide to Console.Waterworks

Both of these guides are printer friendly. And, they are best consumed on your favourite reading chair. If you are away from the world-wide web, these guides are, also, for you.

Online

For those sitting at their computer and connected to the world-wide web, there is a Wiki:

  • GitHub Wiki

This guide aims to be a concise as possible. It assumes you are sitting at your desk and wanting the quick answer -- not the full answer.

Code of Conduct

Please visit the Code of Conduct page for Console.Waterworks at,

  • Code of Conduct page

Contributing to the Console.Waterworks Repository

Please visit the Contributing page for Console.Waterworks at,

  • Contributing page

About the Creator

Hi, my name is Craig and I'm the creator of Console.Waterworks. Thanks for checking it out.