Example #1
0
 public ConsoleCommand(string key, string description, ConsoleProcess process, ConsoleOptions options, Func <bool> requires = null)
     : this(new[] { key }, description, process, options, requires)
 {
 }
Example #2
0
 public ConsoleCommand(IEnumerable <string> keys, string description, ConsoleProcess process, ConsoleOptions options, Func <bool> requires = null)
     : this(keys, description, ConvertProcess(process, options), requires)
 {
 }
Example #3
0
 private static Func <Task> ConvertProcess(ConsoleProcess process, ConsoleOptions options)
 {
     return(process == null
         ? (Func <Task>)null
         : (() => process.RunAsync(options)));
 }