/// <summary>
        /// Creates a new DoubleOption and adds it to the list of accepted options.
        /// </summary>
        /// <param name="shortForm">The optional short form for the option.</param>
        /// <param name="longForm">The long form for the option.</param>
        /// <returns>The newly created Option.</returns>
        /// <exception cref="System.ArgumentNullException">The long form is null.</exception>
        public DoubleOption AddDoubleOption(string shortForm, string longForm)
        {
            if (null == longForm)
            {
                throw new ArgumentNullException("longForm", "The long form is not optional.");
            }

            DoubleOption option = new DoubleOption(shortForm, longForm);

            AddOption((Option)option);
            return(option);
        }
Esempio n. 2
0
        /// <summary>
        /// Creates a new DoubleOption and adds it to the list of accepted options.
        /// </summary>
        /// <param name="shortForm">The optional short form for the option.</param>
        /// <param name="longForm">The long form for the option.</param>
        /// <returns>The newly created Option.</returns>
        /// <exception cref="System.ArgumentNullException">The long form is null.</exception>
        public DoubleOption AddDoubleOption( string shortForm, string longForm )
        {
            if(null == longForm)
                throw new ArgumentNullException("longForm", "The long form is not optional.");

            DoubleOption option = new DoubleOption(shortForm, longForm);
            AddOption((Option)option);
            return option;
        }