/// <summary> /// Adds a switch style option to the configuration. /// </summary> /// <param name="template">Template that identifies the switch.</param> /// <param name="configureAction">Configuration action.</param> /// <returns>Configuration.</returns> public CommandConfiguration <TOptions> Switch(string template, Action <ArgumentConfiguration <TOptions, bool> > configureAction) { return(ConfigureArgument <bool>(template, builder => ArgumentConfiguration <TOptions, bool> .Configure(builder, configureAction) .Switch(Template.ForOptionOrSwitch(template)))); }
internal ValidationConfiguration(ArgumentConfiguration<TOptions, TValue> configuration, IComponentSink<IValidator<TValue>> componentSink) { _configuration = configuration; _componentSink = componentSink; }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="configuration">Configuration.</param> /// <param name="mapperSink">Mapper sink component.</param> internal MappingConfiguration(ArgumentConfiguration <TOptions, TValue> configuration, IComponentSink <IMapper <TOptions, TValue> > mapperSink) { Configuration = configuration; _mapperSink = mapperSink; }
/// <summary> /// Creates a new instance. /// </summary> /// <param name="configuration">Argument configuration.</param> /// <param name="converterSink">Component sink.</param> internal ConversionConfiguration(ArgumentConfiguration <TOptions, TValue> configuration, IComponentSink <IValueConverter <TValue> > converterSink) { _configuration = configuration; _converterSink = converterSink; }