示例#1
0
        /// <summary>
        /// Adds a new switch.
        /// </summary>
        /// <param name="name">The switch name.</param>
        /// <param name="description">The switch description.</param>
        /// <returns>
        /// The <see cref="CommandLineSwitch"/> object this method creates.
        /// </returns>
        public CommandLineSwitch AddSwitch(string name, string description)
        {
            CommandLineSwitch @switch = new CommandLineSwitch(name, description);

            this.options.Add(@switch);
            return(@switch);
        }
示例#2
0
 /// <summary>
 /// Adds a new switch.
 /// </summary>
 /// <param name="switch">The switch to add.</param>
 public void AddSwitch(CommandLineSwitch @switch) => this.options.Add(@switch);