11 implementations of IOptionsMonitor
Aspire.Dashboard.Tests (1)
OtlpApiKeyAuthenticationHandlerTests.cs (1)
104private sealed class TestOptionsMonitor<T> : IOptionsMonitor<T>
Microsoft.AspNetCore.HostFiltering.Tests (1)
MiddlewareConfigurationManagerTests.cs (1)
96internal class OptionsWrapperMonitor<T> : IOptionsMonitor<T>
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RequestTimeoutsMiddlewareBenchmark.cs (1)
126private sealed class Options : IOptionsMonitor<RequestTimeoutOptions>
Microsoft.AspNetCore.Http.Tests (1)
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
379private class MiddlewareOptions : IOptionsMonitor<RequestTimeoutOptions>
Microsoft.AspNetCore.HttpLogging.Tests (1)
OptionsWrapperMonitor.cs (1)
8internal class OptionsWrapperMonitor<T> : IOptionsMonitor<T>
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
StaticOptionsMonitor.cs (1)
9internal sealed class StaticOptionsMonitor<T> : IOptionsMonitor<T>
Microsoft.Extensions.Logging (1)
StaticFilterOptionsMonitor.cs (1)
9internal sealed class StaticFilterOptionsMonitor : IOptionsMonitor<LoggerFilterOptions>
Microsoft.Extensions.Logging.Console (1)
FormatterOptionsMonitor.cs (1)
11IOptionsMonitor<TOptions>
Microsoft.Extensions.Options (1)
OptionsMonitor.cs (1)
16IOptionsMonitor<TOptions>,
Microsoft.Extensions.Telemetry.Tests (2)
Logging\ExtendedLoggerTests.cs (1)
949private sealed class StaticOptionsMonitor<T> : IOptionsMonitor<T>
Logging\SerialExtendedLoggerTests.cs (1)
89private sealed class StaticOptionsMonitor<T> : IOptionsMonitor<T>
292 references to IOptionsMonitor
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
191var options = host.Services.GetRequiredService<IOptionsMonitor<AzureOpenAIClientOptions>>().Get(useKeyed ? "openai" : "Default");
Aspire.Dashboard (20)
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (1)
12public ConnectionTypeAuthenticationHandler(IOptionsMonitor<ConnectionTypeAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\FrontendCompositeAuthenticationHandler.cs (2)
13IOptionsMonitor<DashboardOptions> dashboardOptions, 14IOptionsMonitor<FrontendCompositeAuthenticationHandlerOptions> options,
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (3)
15private readonly IOptionsMonitor<DashboardOptions> _dashboardOptions; 17public OtlpApiKeyAuthenticationHandler(IOptionsMonitor<DashboardOptions> dashboardOptions, IOptionsMonitor<OtlpApiKeyAuthenticationHandlerOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Authentication\OtlpCompositeAuthenticationHandler.cs (2)
16IOptionsMonitor<DashboardOptions> dashboardOptions, 17IOptionsMonitor<OtlpCompositeAuthenticationHandlerOptions> options,
Authentication\UnsecuredAuthenticationHandler.cs (1)
13public UnsecuredAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
DashboardWebApplication.cs (6)
48private readonly IOptionsMonitor<DashboardOptions> _dashboardOptionsMonitor; 94public IOptionsMonitor<DashboardOptions> DashboardOptionsMonitor => _dashboardOptionsMonitor; 170_dashboardOptionsMonitor = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>(); 276_dashboardOptionsMonitor = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>(); 332var options = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>().CurrentValue; 420_app.MapPost("/api/validatetoken", async (string token, HttpContext httpContext, IOptionsMonitor<DashboardOptions> dashboardOptions) =>
Model\ValidateTokenMiddleware.cs (5)
17private readonly IOptionsMonitor<DashboardOptions> _options; 20public ValidateTokenMiddleware(RequestDelegate next, IOptionsMonitor<DashboardOptions> options, ILogger<ValidateTokenMiddleware> logger) 39var dashboardOptions = context.RequestServices.GetRequiredService<IOptionsMonitor<DashboardOptions>>(); 81public static async Task<bool> TryAuthenticateAsync(string incomingBrowserToken, HttpContext httpContext, IOptionsMonitor<DashboardOptions> dashboardOptions)
Aspire.Hosting (2)
Dashboard\DashboardServiceAuth.cs (2)
27IOptionsMonitor<ResourceServiceOptions> resourceServiceOptions, 28IOptionsMonitor<ResourceServiceApiKeyAuthenticationOptions> options,
Aspire.Keycloak.Authentication.Tests (8)
AspireKeycloakExtensionTests.cs (8)
30host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>() 50host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(scheme)); 70var options = host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>() 92var options = host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>() 111host.Services.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>() 131host.Services.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(scheme)); 152var options = host.Services.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>() 175var options = host.Services.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>()
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\TracerProviderBuilderExtensions.cs (1)
73var sqlOptions = sp.GetRequiredService<IOptionsMonitor<SqlClientTraceInstrumentationOptions>>().Get(name);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\TracerProviderBuilderExtensions.cs (1)
73var sqlOptions = sp.GetRequiredService<IOptionsMonitor<SqlClientTraceInstrumentationOptions>>().Get(name);
Aspire.StackExchange.Redis (4)
AspireRedisExtensions.cs (1)
157serviceProvider.GetRequiredService<IOptionsMonitor<ConfigurationOptions>>().Get(optionsName);
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisInstrumentation.cs (2)
15private readonly IOptionsMonitor<StackExchangeRedisInstrumentationOptions> options; 18IOptionsMonitor<StackExchangeRedisInstrumentationOptions> options)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\TracerProviderBuilderExtensions.cs (1)
182sp.GetRequiredService<IOptionsMonitor<StackExchangeRedisInstrumentationOptions>>()));
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
194host.Services.GetRequiredService<IOptionsMonitor<ConfigurationOptions>>().Get("redis") :
BasicWebSite (1)
BasicAuthenticationHandler.cs (1)
13public BasicAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder)
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
693MetadataReference.CreateFromFile(typeof(IOptionsMonitor<>).Assembly.Location),
CustomAuthorizationFailureResponse (1)
Authentication\SampleAuthenticationHandler.cs (1)
15public SampleAuthenticationHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
DynamicSchemes (1)
SimpleAuthHandler.cs (1)
17public SimpleAuthHandler(IOptionsMonitor<SimpleOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
HealthChecksSample (2)
GCInfoHealthCheck.cs (2)
42private readonly IOptionsMonitor<GCInfoOptions> _options; 44public GCInfoHealthCheck(IOptionsMonitor<GCInfoOptions> options)
Identity.DefaultUI.WebSite (2)
Pages\Contoso\Login.cshtml.cs (1)
18public LoginModel(IOptionsMonitor<ContosoAuthenticationOptions> options)
Services\ContosoAuthenticationHandler.cs (1)
15IOptionsMonitor<ContosoAuthenticationOptions> options,
Microsoft.Arcade.Common (1)
CompactConsoleLoggerFormatter.cs (1)
42public CompactConsoleLoggerFormatter(IOptionsMonitor<SimpleConsoleFormatterOptions> options)
Microsoft.AspNetCore.Authentication (12)
AuthenticationHandler.cs (4)
83/// Gets the <see cref="IOptionsMonitor{TOptions}"/> to detect changes to options. 85protected IOptionsMonitor<TOptions> OptionsMonitor { get; } 117protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 133protected AuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
PolicySchemeHandler.cs (2)
24public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 33public PolicySchemeHandler(IOptionsMonitor<PolicySchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
RemoteAuthenticationHandler.cs (2)
48protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 57protected RemoteAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
SignInAuthenticationHandler.cs (2)
25public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 34public SignInAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
SignOutAuthenticationHandler.cs (2)
24public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock) 33public SignOutAuthenticationHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenHandler.cs (1)
16internal sealed class BearerTokenHandler(IOptionsMonitor<BearerTokenOptions> optionsMonitor, ILoggerFactory loggerFactory, UrlEncoder urlEncoder)
Microsoft.AspNetCore.Authentication.Certificate (1)
CertificateAuthenticationHandler.cs (1)
20IOptionsMonitor<CertificateAuthenticationOptions> options,
Microsoft.AspNetCore.Authentication.Cookies (2)
CookieAuthenticationHandler.cs (2)
44public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 54public CookieAuthenticationHandler(IOptionsMonitor<CookieAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Facebook (2)
FacebookHandler.cs (2)
27public FacebookHandler(IOptionsMonitor<FacebookOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 35public FacebookHandler(IOptionsMonitor<FacebookOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Google (2)
GoogleHandler.cs (2)
28public GoogleHandler(IOptionsMonitor<GoogleOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 36public GoogleHandler(IOptionsMonitor<GoogleOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.JwtBearer (2)
JwtBearerHandler.cs (2)
27public JwtBearerHandler(IOptionsMonitor<JwtBearerOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 35public JwtBearerHandler(IOptionsMonitor<JwtBearerOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (2)
MicrosoftAccountHandler.cs (2)
28public MicrosoftAccountHandler(IOptionsMonitor<MicrosoftAccountOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 36public MicrosoftAccountHandler(IOptionsMonitor<MicrosoftAccountOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Negotiate (3)
Internal\NegotiateOptionsValidationStartupFilter.cs (1)
25var options = builder.ApplicationServices.GetRequiredService<IOptionsMonitor<NegotiateOptions>>().Get(_authenticationScheme);
NegotiateHandler.cs (2)
35public NegotiateHandler(IOptionsMonitor<NegotiateOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 43public NegotiateHandler(IOptionsMonitor<NegotiateOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.OAuth (2)
OAuthHandler.cs (2)
45public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 53public OAuthHandler(IOptionsMonitor<TOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectHandler.cs (2)
56public OpenIdConnectHandler(IOptionsMonitor<OpenIdConnectOptions> options, ILoggerFactory logger, HtmlEncoder htmlEncoder, UrlEncoder encoder, ISystemClock clock) 69public OpenIdConnectHandler(IOptionsMonitor<OpenIdConnectOptions> options, ILoggerFactory logger, HtmlEncoder htmlEncoder, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.Test (15)
AuthenticationMiddlewareTests.cs (1)
179var options = app.Services.GetService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme);
CookieTests.cs (2)
292var options = services.BuildServiceProvider().GetRequiredService<IOptionsMonitor<CookieAuthenticationOptions>>();
DynamicSchemeTests.cs (1)
111public TestHandler(IOptionsMonitor<TestOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
JwtBearerTests_Handler.cs (5)
976var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1013var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1040var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1060var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme); 1082var jwtBearerOptions = sp.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme);
OpenIdConnect\OpenIdConnectTests.cs (5)
443var options = sp.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(OpenIdConnectDefaults.AuthenticationScheme); 476var options = sp.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(OpenIdConnectDefaults.AuthenticationScheme); 511sp.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(OpenIdConnectDefaults.AuthenticationScheme)); 533var options = sp.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(OpenIdConnectDefaults.AuthenticationScheme); 561var options = sp.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(OpenIdConnectDefaults.AuthenticationScheme);
TestHandlers.cs (1)
14public TestAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterHandler.cs (2)
42public TwitterHandler(IOptionsMonitor<TwitterOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 50public TwitterHandler(IOptionsMonitor<TwitterOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Authentication.WsFederation (2)
WsFederationHandler.cs (2)
31public WsFederationHandler(IOptionsMonitor<WsFederationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) 42public WsFederationHandler(IOptionsMonitor<WsFederationOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.HostFiltering (2)
HostFilteringMiddleware.cs (1)
40IOptionsMonitor<HostFilteringOptions> optionsMonitor
MiddlewareConfigurationManager.cs (1)
20internal MiddlewareConfigurationManager(IOptionsMonitor<HostFilteringOptions> _optionsMonitor, ILogger<HostFilteringMiddleware> logger)
Microsoft.AspNetCore.Http (2)
Timeouts\RequestTimeoutsMiddleware.cs (2)
15private readonly IOptionsMonitor<RequestTimeoutOptions> _options; 21IOptionsMonitor<RequestTimeoutOptions> options)
Microsoft.AspNetCore.HttpLogging (9)
FileLoggerProcessor.cs (2)
27private readonly IOptionsMonitor<W3CLoggerOptions> _options; 40public FileLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory)
HttpLoggingMiddleware.cs (2)
23private readonly IOptionsMonitor<HttpLoggingOptions> _options; 26public HttpLoggingMiddleware(RequestDelegate next, IOptionsMonitor<HttpLoggingOptions> options, ILogger<HttpLoggingMiddleware> logger,
W3CLogger.cs (2)
14private readonly IOptionsMonitor<W3CLoggerOptions> _options; 17public W3CLogger(IOptionsMonitor<W3CLoggerOptions> options, W3CLoggerProcessor messageQueue)
W3CLoggerProcessor.cs (1)
19public W3CLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory) : base(options, environment, factory)
W3CLoggingMiddleware.cs (2)
21private readonly IOptionsMonitor<W3CLoggerOptions> _options; 53public W3CLoggingMiddleware(RequestDelegate next, IOptionsMonitor<W3CLoggerOptions> options, W3CLogger w3cLogger)
Microsoft.AspNetCore.HttpLogging.Tests (68)
Helpers.cs (1)
27public static TestW3CLogger CreateTestW3CLogger(IOptionsMonitor<W3CLoggerOptions> options)
HttpLoggingMiddlewareTests.cs (54)
103var options = CreateOptionsAccessor(); 147var options = CreateOptionsAccessor(); 179var options = CreateOptionsAccessor(); 211var options = CreateOptionsAccessor(); 270var options = CreateOptionsAccessor(); 292var options = CreateOptionsAccessor(); 310var options = CreateOptionsAccessor(); 341var options = CreateOptionsAccessor(); 369var options = CreateOptionsAccessor(); 397var options = CreateOptionsAccessor(); 434var options = CreateOptionsAccessor(); 470var options = CreateOptionsAccessor(); 495var options = CreateOptionsAccessor(); 528var options = CreateOptionsAccessor(); 563var options = CreateOptionsAccessor(); 601var options = CreateOptionsAccessor(); 639var options = CreateOptionsAccessor(); 678var options = CreateOptionsAccessor(); 714var options = CreateOptionsAccessor(); 732var options = CreateOptionsAccessor(); 759var options = CreateOptionsAccessor(); 787var options = CreateOptionsAccessor(); 836var options = CreateOptionsAccessor(); 860var options = CreateOptionsAccessor(); 882var options = CreateOptionsAccessor(); 906var options = CreateOptionsAccessor(); 932var options = CreateOptionsAccessor(); 956var options = CreateOptionsAccessor(); 980var options = CreateOptionsAccessor(); 1000var options = CreateOptionsAccessor(); 1025var options = CreateOptionsAccessor(); 1045var options = CreateOptionsAccessor(); 1066var options = CreateOptionsAccessor(); 1087var options = CreateOptionsAccessor(); 1125var options = CreateOptionsAccessor(); 1162var options = CreateOptionsAccessor(); 1182var options = CreateOptionsAccessor(); 1197var options = CreateOptionsAccessor(); 1240var options = CreateOptionsAccessor(); 1301var options = CreateOptionsAccessor(); 1344var options = CreateOptionsAccessor(); 1390var options = CreateOptionsAccessor(); 1425var options = CreateOptionsAccessor(); 1462var options = CreateOptionsAccessor(); 1503var options = CreateOptionsAccessor(); 1572var options = CreateOptionsAccessor(); 1612var options = CreateOptionsAccessor(); 1640var options = CreateOptionsAccessor(); 1668var options = CreateOptionsAccessor(); 1696var options = CreateOptionsAccessor(); 1968private IOptionsMonitor<HttpLoggingOptions> CreateOptionsAccessor() 1971var optionsAccessor = Mock.Of<IOptionsMonitor<HttpLoggingOptions>>(o => o.CurrentValue == options); 1976IOptionsMonitor<HttpLoggingOptions> options = null,
TestW3CLogger.cs (1)
10public TestW3CLogger(IOptionsMonitor<W3CLoggerOptions> options, TestW3CLoggerProcessor processor) : base(options, processor)
TestW3CLoggerProcessor.cs (1)
18public TestW3CLoggerProcessor(IOptionsMonitor<W3CLoggerOptions> options, IHostEnvironment environment, ILoggerFactory factory) : base(options, environment, factory)
W3CLoggingMiddlewareTests.cs (11)
17var options = CreateOptionsAccessor(); 41var options = CreateOptionsAccessor(); 69var options = CreateOptionsAccessor(); 107var options = CreateOptionsAccessor(); 153var options = CreateOptionsAccessor(); 183var options = CreateOptionsAccessor(); 219var options = CreateOptionsAccessor(); 274var options = CreateOptionsAccessor(); 308private IOptionsMonitor<W3CLoggerOptions> CreateOptionsAccessor() 311var optionsAccessor = Mock.Of<IOptionsMonitor<W3CLoggerOptions>>(o => o.CurrentValue == options);
Microsoft.AspNetCore.Identity (3)
IdentityApiEndpointRouteBuilderExtensions.cs (2)
46var bearerTokenOptions = endpoints.ServiceProvider.GetRequiredService<IOptionsMonitor<BearerTokenOptions>>();
IdentityServiceCollectionExtensions.cs (1)
189private sealed class CompositeIdentityHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder)
Microsoft.AspNetCore.Identity.Test (2)
IdentityOptionsTest.cs (2)
84var options = serviceProvider.GetRequiredService<IOptionsMonitor<CookieAuthenticationOptions>>();
Microsoft.AspNetCore.OpenApi (4)
Extensions\OpenApiEndpointRouteBuilderExtensions.cs (2)
30var options = endpoints.ServiceProvider.GetRequiredService<IOptionsMonitor<OpenApiOptions>>();
Services\OpenApiDocumentProvider.cs (2)
28var options = serviceProvider.GetRequiredService<IOptionsMonitor<OpenApiOptions>>();
Microsoft.AspNetCore.OpenApi.Tests (4)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Info.cs (2)
59internal IOptionsMonitor<OpenApiOptions> GetMockOptionsMonitor() 61var openApiOptions = new Mock<IOptionsMonitor<OpenApiOptions>>();
Services\OpenApiDocumentServiceTestsBase.cs (2)
85var openApiOptions = new Mock<IOptionsMonitor<OpenApiOptions>>(); 121var options = new Mock<IOptionsMonitor<OpenApiOptions>>();
Microsoft.AspNetCore.Tests (5)
WebApplicationTests.cs (3)
1363var monitor = app.Services.GetRequiredService<IOptionsMonitor<HostFilteringOptions>>(); 2851public UberHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder) { }
WebHostTests.cs (2)
39var monitor = host.Services.GetRequiredService<IOptionsMonitor<HostFilteringOptions>>();
Microsoft.Extensions.Diagnostics (1)
Metrics\MetricsSubscriptionManager.cs (1)
18public MetricsSubscriptionManager(IEnumerable<IMetricsListener> listeners, IOptionsMonitor<MetricsOptions> options, IMeterFactory meterFactory)
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesExtensions.cs (1)
51var options = provider.GetRequiredService<IOptionsMonitor<TcpEndpointProbesOptions>>().Get(name);
Microsoft.Extensions.Diagnostics.Probes.Tests (12)
KubernetesProbesExtensionsTests.cs (6)
37var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 42var config = configurations.First(); 81var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 85var config = configurations.First(); 109var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 113var config = configurations.First();
TcpEndpointProbesExtensionsTests.cs (6)
93var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 96var config = Assert.Single(configurations); 144var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 148var configuration = configurations.First(); 165var configurations = host.Services.GetServices<IOptionsMonitor<TcpEndpointProbesOptions>>(); 169var config = configurations.First();
Microsoft.Extensions.Http (6)
DefaultHttpClientFactory.cs (2)
24private readonly IOptionsMonitor<HttpClientFactoryOptions> _optionsMonitor; 65IOptionsMonitor<HttpClientFactoryOptions> optionsMonitor,
DefaultHttpMessageHandlerBuilder.cs (2)
71if (Services.GetService<IOptionsMonitor<HttpClientFactoryOptions>>() is IOptionsMonitor<HttpClientFactoryOptions> optionsMonitor)
Logging\LoggingHttpMessageHandlerBuilderFilter.cs (2)
21private readonly IOptionsMonitor<HttpClientFactoryOptions> _optionsMonitor; 23public LoggingHttpMessageHandlerBuilderFilter(IServiceProvider serviceProvider, IOptionsMonitor<HttpClientFactoryOptions> optionsMonitor)
Microsoft.Extensions.Http.Diagnostics (5)
Logging\Internal\HttpClientLogger.cs (1)
43IOptionsMonitor<LoggingOptions> optionsMonitor,
Logging\Internal\HttpHeadersReader.cs (1)
26public HttpHeadersReader(IOptionsMonitor<LoggingOptions> optionsMonitor, IHttpHeadersRedactor redactor, [ServiceKey] string? serviceKey = null)
Logging\Internal\HttpRequestReader.cs (1)
47IOptionsMonitor<LoggingOptions> optionsMonitor,
Logging\Internal\OptionsExtensions.cs (2)
15/// <param name="optionsMonitor">The <see cref="IOptionsMonitor{TOptions}"/> to load the options object from.</param> 19this IOptionsMonitor<TOptions> optionsMonitor, string? serviceKey)
Microsoft.Extensions.Http.Diagnostics.Tests (17)
Logging\AcceptanceTests.cs (9)
471var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(FirstClientName); 472var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(SecondClientName); 506var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient1)); 507var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient2)); 556var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient1)); 557var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient2)); 558var optionsThird = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("testClient3"); 559var optionsFourth = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("testClient4"); 560var optionsFifth = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("testClient5");
Logging\HttpClientLoggingExtensionsTest.cs (6)
93var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test1"); 94var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test2"); 116var optionsFirst = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient1)); 117var optionsSecond = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get(nameof(ITestHttpClient2)); 178var options = provider.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test"); 235.GetRequiredService<IOptionsMonitor<LoggingOptions>>().Get("test");
Logging\Internal\HelperExtensions.cs (2)
26public static IOptionsMonitor<LoggingOptions> ToOptionsMonitor(this LoggingOptions options, string? key = null) 28var snapshotMock = new Mock<IOptionsMonitor<LoggingOptions>>();
Microsoft.Extensions.Http.Resilience (6)
Internal\NamedOptionsCache.cs (1)
15public NamedOptionsCache(string optionsName, IOptionsMonitor<TOptions> optionsMonitor)
Resilience\Internal\PipelineKeyProviderHelper.cs (1)
28return provider.GetRequiredService<IOptionsMonitor<PipelineKeyOptions>>().Get(pipelineName).KeyProvider;
Resilience\ResilienceHttpClientBuilderExtensions.StandardResilience.cs (2)
79var monitor = context.ServiceProvider.GetRequiredService<IOptionsMonitor<HttpStandardResilienceOptions>>();
Routing\RoutingStrategyBuilderExtensions.cs (2)
130var optionsCache = new NamedOptionsCache<OrderedGroupsRoutingOptions>(builder.Name, serviceProvider.GetRequiredService<IOptionsMonitor<OrderedGroupsRoutingOptions>>()); 142var optionsCache = new NamedOptionsCache<WeightedGroupsRoutingOptions>(builder.Name, serviceProvider.GetRequiredService<IOptionsMonitor<WeightedGroupsRoutingOptions>>());
Microsoft.Extensions.Http.Resilience.Tests (6)
Hedging\StandardHedgingTests.cs (5)
66var options = serviceProvider.GetRequiredService<IOptionsMonitor<HttpStandardHedgingResilienceOptions>>().Get(Builder.Name); 81var options = serviceProvider.GetRequiredService<IOptionsMonitor<HttpStandardHedgingResilienceOptions>>().Get(Builder.Name); 103var options = serviceProvider.GetRequiredService<IOptionsMonitor<HttpStandardHedgingResilienceOptions>>().Get(Builder.Name); 112var options = serviceProvider.GetRequiredService<IOptionsMonitor<HttpStandardHedgingResilienceOptions>>().Get(Builder.Name); 143.GetRequiredService<IOptionsMonitor<HttpStandardHedgingResilienceOptions>>()
Routing\RoutingStrategyTest.cs (1)
154.GetRequiredService<IOptionsMonitor<RequestRoutingOptions>>()
Microsoft.Extensions.Logging (3)
LoggerFactory.cs (3)
60public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption) : this(providers, filterOption, null) 70public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption, IOptions<LoggerFactoryOptions>? options) : this(providers, filterOption, options, null) 81public LoggerFactory(IEnumerable<ILoggerProvider> providers, IOptionsMonitor<LoggerFilterOptions> filterOption, IOptions<LoggerFactoryOptions>? options = null, IExternalScopeProvider? scopeProvider = null)
Microsoft.Extensions.Logging.AzureAppServices (5)
BatchingLoggerProvider.cs (1)
35internal BatchingLoggerProvider(IOptionsMonitor<BatchingLoggerOptions> options)
BlobLoggerProvider.cs (3)
22private readonly IOptionsMonitor<AzureBlobLoggerOptions> _options; 31public BlobLoggerProvider(IOptionsMonitor<AzureBlobLoggerOptions> options) 46IOptionsMonitor<AzureBlobLoggerOptions> options,
FileLoggerProvider.cs (1)
30public FileLoggerProvider(IOptionsMonitor<AzureFileLoggerOptions> options) : base(options)
Microsoft.Extensions.Logging.Console (6)
ConsoleLoggerProvider.cs (3)
21private readonly IOptionsMonitor<ConsoleLoggerOptions> _options; 33public ConsoleLoggerProvider(IOptionsMonitor<ConsoleLoggerOptions> options) 41public ConsoleLoggerProvider(IOptionsMonitor<ConsoleLoggerOptions> options, IEnumerable<ConsoleFormatter>? formatters)
JsonConsoleFormatter.cs (1)
22public JsonConsoleFormatter(IOptionsMonitor<JsonConsoleFormatterOptions> options)
SimpleConsoleFormatter.cs (1)
27public SimpleConsoleFormatter(IOptionsMonitor<SimpleConsoleFormatterOptions> options)
SystemdConsoleFormatter.cs (1)
17public SystemdConsoleFormatter(IOptionsMonitor<ConsoleFormatterOptions> options)
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (8)
DependencyInjectionExtensionsTests.cs (8)
54var sut = provider.GetRequiredService<IOptionsMonitor<DependencyInjectionPoolOptions>>(); 69var options = provider.GetRequiredService<IOptionsMonitor<DependencyInjectionPoolOptions>>(); 119var optionsMonitor = provider.GetRequiredService<IOptionsMonitor<DependencyInjectionPoolOptions>>(); 148var optionsMonitor = provider.GetRequiredService<IOptionsMonitor<DependencyInjectionPoolOptions>>();
Microsoft.Extensions.Options (6)
IOptionsMonitorCache.cs (1)
10/// Used by <see cref="IOptionsMonitor{TOptions}"/> to cache <typeparamref name="TOptions"/> instances.
OptionsBuilderExtensions.cs (1)
31.Configure<IOptionsMonitor<TOptions>>((vo, options) =>
OptionsMonitor.cs (1)
12/// Implements <see cref="IOptionsMonitor{TOptions}"/>.
OptionsMonitorExtensions.cs (2)
10/// Extension methods for <see cref="IOptionsMonitor{TOptions}"/>. 22this IOptionsMonitor<TOptions> monitor,
OptionsServiceCollectionExtensions.cs (1)
28services.TryAdd(ServiceDescriptor.Singleton(typeof(IOptionsMonitor<>), typeof(OptionsMonitor<>)));
Microsoft.Extensions.Options.ConfigurationExtensions (1)
ConfigurationChangeTokenSource.cs (1)
11/// Creates <see cref="IChangeToken"/>s so that <see cref="IOptionsMonitor{TOptions}"/> gets
Microsoft.Extensions.ServiceDiscovery.Dns (4)
DnsServiceEndpointProvider.cs (1)
13IOptionsMonitor<DnsServiceEndpointProviderOptions> options,
DnsServiceEndpointProviderFactory.cs (1)
11IOptionsMonitor<DnsServiceEndpointProviderOptions> options,
DnsSrvServiceEndpointProvider.cs (1)
16IOptionsMonitor<DnsSrvServiceEndpointProviderOptions> options,
DnsSrvServiceEndpointProviderFactory.cs (1)
12IOptionsMonitor<DnsSrvServiceEndpointProviderOptions> options,
Microsoft.Extensions.Telemetry (3)
Logging\ExtendedLoggerFactory.cs (3)
37IOptionsMonitor<LoggerFilterOptions> filterOptions, 40IOptionsMonitor<LoggerEnrichmentOptions>? enrichmentOptions = null, 41IOptionsMonitor<LoggerRedactionOptions>? redactionOptions = null,
OpenIdConnectSample (1)
Startup.cs (1)
141public void Configure(IApplicationBuilder app, IOptionsMonitor<OpenIdConnectOptions> optionsMonitor)
PathSchemeSelection (1)
Startup.cs (1)
44public ApiAuthHandler(IOptionsMonitor<AuthenticationSchemeOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
SocialSample (4)
Startup.cs (4)
472return Task.FromResult<OAuthOptions>(context.RequestServices.GetRequiredService<IOptionsMonitor<GoogleOptions>>().Get(currentAuthType)); 476return Task.FromResult<OAuthOptions>(context.RequestServices.GetRequiredService<IOptionsMonitor<MicrosoftAccountOptions>>().Get(currentAuthType)); 480return Task.FromResult<OAuthOptions>(context.RequestServices.GetRequiredService<IOptionsMonitor<FacebookOptions>>().Get(currentAuthType)); 484return Task.FromResult<OAuthOptions>(context.RequestServices.GetRequiredService<IOptionsMonitor<OAuthOptions>>().Get(currentAuthType));