private Switch AddSwitch(string name, string description) { var switchArgument = new Switch(name, _); var switchHelp = new SwitchHelp(switchArgument) { Description = description }; this.arguments.Add(switchArgument); this.help.Add(switchHelp); return(switchArgument); }
public SwitchComposer( string name, Action callback, CommandLineParserConfigurator configurator, Action <Argument> addToArguments, Action <string, IArgumentWithName> addLongAlias, Action <Help.Help> addHelp) : base(configurator) { this.addLongAlias = addLongAlias; this.current = new Switch(name, callback); this.help = new SwitchHelp(this.current); addToArguments(this.current); addHelp(this.help); }