Browse Source

Began adding documentation.

Wrote a large chunk of the README file. It still needs links added to it and proof read but the bulk of it is there. I, also, made minor changes to the code for readability purposes.
Code of conduct and contribution pages are yet to be started.
merge-requests/1/head
Craig Oates 7 years ago
parent
commit
6d2b0d826d
  1. 2
      Console.Waterworks/CW_Console/ConsoleCommands.cs
  2. 2
      Console.Waterworks/Console.Waterworks/CoOrdinators/CoOrdinator.cs
  3. 100
      README.md

2
Console.Waterworks/CW_Console/ConsoleCommands.cs

@ -4,7 +4,7 @@ using System;
namespace CW_Console
{
public static class ConsoleCommands
public class ConsoleCommands
{
[ListCommand()]
[Description("Displays the Help section at run-time")]

2
Console.Waterworks/Console.Waterworks/CoOrdinators/CoOrdinator.cs

@ -75,7 +75,7 @@ namespace Console.Waterworks.CoOrdinators
}
_logger.LogSuccessMessage("Found help information");
_logger.LogInfoMessage("Attempting to display the help information..");
_consoleSpec.WriteOutputToConsole("Displaying Help section.");
_consoleSpec.WriteOutputToConsole("Displaying Help section...");
_consoleSpec.LineBreak();
var commandMembers = _helpSpec.GetCommandMembers(commandClasses);
foreach (var command in commandMembers)

100
README.md

@ -1,2 +1,98 @@
# Console.Waterworks
Console.Waterworks is a Nuget package which helps you write command-based console programs in .Net.
# 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,
```c#
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,
```c#
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. If not, "soz" but -- in all fairness -- I did try.
### 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.
- Email: craig@craigoates.net
- Web: http://www.craigoates.net
Loading…
Cancel
Save