6 Using CW Console
Craig Oates edited this page 4 years ago

This repository provides a traditional .Net 4.7 console program. Its main purpose is to provide a way to test the Console.Waterworks (C.W.) library at run-time. I should point out, this console does not come with a separate installer. So, you will need to build the project after cloning the repository.

To operate CW-Console, you enter commands and its required arguments into the console -- like other Command Line Interfaces (C.L.I.). With that said, this console program operates in a different manner to PowerShell, for example. This means you need to put aside your assumptions if you are a regular user of shells/terminals/consoles.

When you start the console, you will see something similar to the image below.

cw-console start screen

From here, you can begin entering commands. Before continuing, it is worth noting the "Help" command. When you enter Help into the console prompt, the console will show you a list of all the commands the program can run.

run-time help section

If you would like to view the source code of the commands, you can peruse through them all using the following link:

If you go through the "Help" section, you will notice most of the commands have input arguments. From your point-of-view, they are typical (input) types (int, string Etc.). There are limitations to these arguments but you can extend them if you want; I do not recommend you do that, though. If you would like to know more about about these limitations, please use the following link:

You should not notice the limitations for the most part. Although, if you are wanting to work with this projects source code, I recommend you glance at the list in the above link at least.

Console A.P.I.

One of the main purposes of CW-Console is to provide a way to test C.W. at run-time. Because of this, the console does not provide interesting features -- outside its testing purposes. So, there is no "real" application program interface (A.P.I.) to document. With that said, here is a list of the console's commands, for the sake of completeness.

Help

  • N.A.
  • Lists out the commands this program offers/provides.
  • Help

Test

  • N.A.
  • Outputs a message indicating this program is running okay.
  • Test

Say

  • (string: input)
  • Repeats back to the user the string they entered into the prompt.
  • Say "Hello, World!"

GetDate

  • N.A.
  • Displays the date and time at the moment the user entered the command.
  • GetDate

Add

  • (int: int1) (int: int2)
  • Adds two integers together and prints the result out to the console.
  • Add 5 89

Quit

  • N.A.
  • Closes the program.
  • Quit