Beispiel #1
0
        public static ArgsCommandBuilderRootCommand ArgsCommandBuilder(this string[] thisValue, string description = null)
        {
            var result = new ArgsCommandBuilderRootCommand()
            {
                Args    = thisValue,
                Command = new RootCommand(description),
                Parent  = null
            };

            return(result);
        }
Beispiel #2
0
        public static ArgsCommandBuilderLevel1Command Command(this ArgsCommandBuilderRootCommand thisValue, string name, string description = null)
        {
            var result = new ArgsCommandBuilderLevel1Command
            {
                Command = new Command(name, description),
                Parent  = thisValue
            };

            thisValue.Command.AddCommand(result.Command);
            return(result);
        }