public FilterActionFactory(IServiceProvider serviceProvider, IConfigurationContainer configurationContainer) { this.serviceProvider = serviceProvider; filtersDictionary = new ConcurrentDictionary <string, Tuple <IFilter, MappingFilterConfiguration> >(StringComparer.OrdinalIgnoreCase); configurationContainer.Configure <Dictionary <string, MappingFilterConfiguration> >("Filters", this.BindConfiguration); }
public RouterFilter( IConfigurationContainer configurationContainer, IHttpClientFactory httpClientFactory, IFilterActionFactory filterActionFactory) { this.httpClientFactory = httpClientFactory; this.filterActionFactory = filterActionFactory; configurationContainer.Configure <RoutingConfiguration>(string.Empty, cfg => { cfg.Mappings = cfg.Mappings?.OrderByDescending(x => x.Value?.Path.Value.Length) .ToDictionary(x => x.Key, x => x.Value); this.routingConfiguration = cfg; }); }
public CertificateProvider(IConfigurationContainer configurationContainer) { this.cacheDictionary = new ConcurrentDictionary <string, Tuple <X509Certificate2, CertificateConfiguration> >(StringComparer.OrdinalIgnoreCase); configurationContainer.Configure <Dictionary <string, CertificateConfiguration> >(Constants.RoutingCertificatesConfigurationSection, this.BindConfigure); }