3 instantiations of HostFilteringOptions
Microsoft.AspNetCore.HostFiltering.Tests (3)
MiddlewareConfigurationManagerTests.cs (3)
18var options = new HostFilteringOptions() 44var newOption = new HostFilteringOptions 73var options = new HostFilteringOptions()
27 references to HostFilteringOptions
CreateDefaultBuilderOfTApp (1)
Program.cs (1)
37var hostFilteringOptions = app.ApplicationServices.GetRequiredService<IOptions<HostFilteringOptions>>();
HostFilteringSample (3)
Startup.cs (3)
26services.PostConfigure<HostFilteringOptions>(options => 37services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(new ConfigurationChangeTokenSource<HostFilteringOptions>(Config));
Microsoft.AspNetCore (3)
WebHost.cs (3)
254services.PostConfigure<HostFilteringOptions>(options => 265services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>( 266new ConfigurationChangeTokenSource<HostFilteringOptions>(hostingContext.Configuration));
Microsoft.AspNetCore.HostFiltering (6)
HostFilteringMiddleware.cs (1)
40IOptionsMonitor<HostFilteringOptions> optionsMonitor
HostFilteringServicesExtensions.cs (2)
18/// <param name="configureOptions">A delegate to configure the <see cref="HostFilteringOptions"/>.</param> 20public static IServiceCollection AddHostFiltering(this IServiceCollection services, Action<HostFilteringOptions> configureOptions)
MiddlewareConfigurationManager.cs (3)
20internal MiddlewareConfigurationManager(IOptionsMonitor<HostFilteringOptions> _optionsMonitor, ILogger<HostFilteringMiddleware> logger) 38private MiddlewareConfiguration ConfigureMiddleware(HostFilteringOptions options) 91private static string GetLogMessageForHostFilteringOptions(HostFilteringOptions hostFilteringOptions)
Microsoft.AspNetCore.HostFiltering.Tests (7)
HostFilteringMiddlewareTests.cs (2)
242services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(new ConfigurationChangeTokenSource<HostFilteringOptions>(config));
MiddlewareConfigurationManagerTests.cs (5)
18var options = new HostFilteringOptions() 25var optionsMonitor = new OptionsWrapperMonitor<HostFilteringOptions>(options); 44var newOption = new HostFilteringOptions 73var options = new HostFilteringOptions() 80var optionsMonitor = new OptionsWrapperMonitor<HostFilteringOptions>(options);
Microsoft.AspNetCore.Tests (7)
WebApplicationTests.cs (5)
1363var monitor = app.Services.GetRequiredService<IOptionsMonitor<HostFilteringOptions>>(); 1364var options = monitor.CurrentValue; 1756Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IOptionsChangeTokenSource<HostFilteringOptions>))); 1764Assert.Single(app.Services.GetRequiredService<IEnumerable<IOptionsChangeTokenSource<HostFilteringOptions>>>()); 1774Assert.DoesNotContain(builder.Services, descriptor => descriptor.ServiceType == typeof(IOptionsChangeTokenSource<HostFilteringOptions>));
WebHostTests.cs (2)
39var monitor = host.Services.GetRequiredService<IOptionsMonitor<HostFilteringOptions>>(); 40var options = monitor.CurrentValue;