Exemplo n.º 1
0
        public ParserResultConfigBackend(
            ICliSpecDeriverConfig specDeriverConfig,
            ICliSpecification spec,
            IParserResult pr,
            Type t)
        {
            if (specDeriverConfig == null)
            {
                throw new ArgumentException(
                          $"{nameof( specDeriverConfig )} must not be null",
                          nameof(specDeriverConfig));
            }
            if (spec == null)
            {
                throw new ArgumentException($"{nameof( spec )} must not be null", nameof(spec));
            }
            if (pr == null)
            {
                throw new ArgumentException($"{nameof( pr )} must not be null", nameof(pr));
            }
            if (t == null)
            {
                throw new ArgumentException($"{nameof( t )} must not be null", nameof(t));
            }

            _specDeriverConfig = specDeriverConfig;
            _spec = spec;
            _pr   = pr;
            _t    = t;
        }
Exemplo n.º 2
0
 public ConstraintsCollector(
     ICliSpecDeriverConfig specDeriverConfig,
     ICliSpecification spec)
 {
     _specDeriverConfig = specDeriverConfig;
     _spec = spec;
 }
Exemplo n.º 3
0
 public ConstraintsProviderContext(ICliSpecification spec, ICliSpecDeriverConfig specDeriverConfig)
 {
     _spec = spec;
     _specDeriverConfig = specDeriverConfig;
     _itemRules         = new Dictionary <string, IRule <IParserResult> >( );
     _argumentRules     = new Dictionary <string, IRule <IParserResult> >( );
     _rules             = new List <IRule <IParserResult> >( );
 }
Exemplo n.º 4
0
        public ParserResultMapper(
            ICliSpecDeriverConfig specDeriverConfig,
            ICliSpecification spec)
        {
            if (specDeriverConfig == null)
            {
                throw new ArgumentException(
                          $"{nameof( specDeriverConfig )} must not be null",
                          nameof(specDeriverConfig));
            }
            if (spec == null)
            {
                throw new ArgumentException($"{nameof( spec )} must not be null", nameof(spec));
            }

            _specDeriverConfig = specDeriverConfig;
            _spec = spec;
        }
Exemplo n.º 5
0
 public CliSpecDeriver(ICliSpecDeriverConfig config = null)
 {
     _config        = config ?? Config.New <ICliSpecDeriverConfig>( );
     _argTypeMapper = new ArgumentTypeMapper(_config.ExtendedAttributeMappers);
 }