Ejemplo n.º 1
0
 public ConsoleCommand(string name, string description, string usage, cmdCallBack callback) : this()
 {
     this.name        = name;
     this.description = (string.IsNullOrEmpty(description.Trim()) ? "No description provided" : description);
     this.usage       = (string.IsNullOrEmpty(usage.Trim()) ? "[none]" : usage);
     this.callback    = callback;
 }
Ejemplo n.º 2
0
 public static void RegisterCommand(string command, string description, string usage, cmdCallBack callback)
 {
     database[command.ToLower()] = new ConsoleCommand(command.ToLower(), description, usage, callback);
 }