コード例 #1
0
ファイル: HelpOption.cs プロジェクト: brijnandan/cafe
 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);
 }