Beispiel #1
0
 public CliRootCommandSource(RootCommandSource root, CommandSourceBase parent)
     : base(new Command("cli-root", "This is the entry point, the end user types the executable name"), parent)
 {
     StringPropertyOption = GetStringProperty();
     Command.Add(StringPropertyOption);
     ctorParamOption = GetctorParam();
     Command.Add(ctorParamOption);
     FindCommand = new FindCommandSource(this, this);
     Command.AddCommand(FindCommand.Command);
     ListCommand = new ListCommandSource(this, this);
     Command.AddCommand(ListCommand.Command);
     Command.Handler = CommandHandler.Create((InvocationContext context) =>
     {
         CurrentCommandSource = this;
         CurrentParseResult   = context.ParseResult;
         return(0);
     });
 }
 public ListCommandSourceResult(ParseResult parseResult, ListCommandSource commandSource, int exitCode)
     : base(parseResult, (commandSource.ParentCommandSource as CliRootCommandSource), exitCode)
 {
     verbosityOption_Result = CommandSourceMemberResult.Create(commandSource.verbosityOption, parseResult);
 }