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.

36 lines
1.6 KiB

using Console.Waterworks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CW_Console
{
public static class ConsoleCommands
{
public static string Help()
{
CW_Liaison liaison = new CW_Liaison();
return liaison.RequestHelpDocumentation("CW_Console");
}
public static string Command1() => "Command1 has completed";
public static string Command2(string input) => $"Command2 has completed... {input} was entered";
public static string Command3(int input) => $"Command3 has completed... The number {input} was entered";
public static string Command4(int int1, int int2) => $"Command4 has completed... {int1} and {int2} was entered and make {int1 + int2} when added together";
public static string Command5(int int1, double double1) => $"Command5 has completed... {int1} and {double1} was entered and make {int1 + double1} when added together";
public static void Quit() => Environment.Exit(-1);
#region Alias Methods
// These methods are shorthand versions of the ones above.
// These are useful for experienced users of your console program.
public static string c1() => Command1();
public static string c2(string input) => Command2(input);
public static string c3(int input) => Command3(input);
public static string c4(int int1, int int2) => Command4(int1, int2);
public static string c5(int int1, double double1) => Command5(int1, double1);
public static void quit() => Quit();
#endregion
}
}