示例#1
0
 public HelpOption(OptionGroup optionGroup, Option option = null,
                   OptionSpecification specification      = null) : base("help", false)
 {
     _optionGroup   = optionGroup;
     _option        = option;
     _specification = specification;
 }
示例#2
0
        public OptionSpecification WithAdditionalSpecifications(params OptionValueSpecification[] valueSpecifications)
        {
            var allValues = new List <OptionValueSpecification>();

            allValues.AddRange(_valueSpecifications);
            allValues.RemoveAll(a => !a.IsRequired);
            allValues.AddRange(valueSpecifications);
            var optionSpecification = new OptionSpecification(allValues.ToArray());

            return(optionSpecification);
        }
示例#3
0
 public OptionGroup(params OptionValueSpecification[] groupSpecifications)
 {
     _groupSpecification = new OptionSpecification(groupSpecifications);
 }