public OptionsParser(IValueParserFactory valueParserFactory) { _optionsMetadata = new OptionsMetadata(typeof(TOptions)); _optionsFactory = new OptionsFactory <TOptions>(_optionsMetadata); _valueParserSelector = new ValueParserSelector(valueParserFactory); _optionsMetadataValidator = new OptionsMetadataValidator <TOptions>(_optionsMetadata, _optionsFactory, _valueParserSelector); _optionsValidator = new OptionsValidator(); }
public OptionsFactory(OptionsMetadata optionsMetadata) { _strategies = new IOptionsFactory <TOptions>[] { new SetterOptionsFactoringStrategy <TOptions>(optionsMetadata), new CtorOptionsFactoringStrategy <TOptions>(optionsMetadata) }; }
public OptionsMetadataValidator( OptionsMetadata optionsMetadata, IOptionsFactory <TOptions> optionsFactory, ValueParserSelector valueParserSelector) { _optionsMetadata = optionsMetadata; _optionsFactory = optionsFactory; _valueParserSelector = valueParserSelector; }
public CtorOptionsFactoringStrategy(OptionsMetadata optionsMetadata) { _optionsMetadata = optionsMetadata; }
public SetterOptionsFactoringStrategy(OptionsMetadata optionMetadata) { _optionMetadata = optionMetadata; }
public OptionsParsingContext(OptionsMetadata optionsMetadata) { _collectionValueFactory = new CollectionValueFactory(); _values = CreateInitialValues(optionsMetadata); _errors = new List <string>(); }