private ICommandLineOptionFluent <T> SetupInternal <T>(string shortOption, string longOption)
        {
            var argOption = this.OptionFactory.CreateOption <T>(shortOption, longOption);

            if (argOption == null)
            {
                throw new InvalidOperationException("OptionFactory is producing unexpected results.");
            }

            OptionValidator.Validate(argOption);

            this.Options.Add(argOption);

            return(argOption);
        }
        private ICommandLineOptionFluent <T> SetupInternal <T>(string shortOption, string longOption)
        {
            var argOption = this.OptionFactory.CreateOption <T>(shortOption, longOption);

            if (argOption == null)
            {
                throw new InvalidOperationException("OptionFactory is producing unexpected results.");
            }

            OptionValidator.Validate(argOption, Parser.IsCaseSensitive ? StringComparison.CurrentCulture : StringComparison.CurrentCultureIgnoreCase);

            _options.Add(argOption);

            return(argOption);
        }
 public void OptionValidatorTest()
 {
     var optionValidator      = new OptionValidator();
     var option               = new Option();
     ValidationResults result = optionValidator.Validate(option);
 }
 public void OptionValidatorTest()
 {
     var optionValidator = new OptionValidator();
     var option = new Option();
     ValidationResults result = optionValidator.Validate(option);
 }