11 implementations of Get
Aspire.Dashboard.Tests (1)
OtlpApiKeyAuthenticationHandlerTests.cs (1)
110public T Get(string? name) => CurrentValue;
Microsoft.AspNetCore.HostFiltering.Tests (1)
MiddlewareConfigurationManagerTests.cs (1)
111public T Get(string name) => CurrentValue;
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RequestTimeoutsMiddlewareBenchmark.cs (1)
142public RequestTimeoutOptions Get(string name) => _options;
Microsoft.AspNetCore.Http.Tests (1)
Timeouts\RequestTimeoutsMiddlewareTests.cs (1)
389public RequestTimeoutOptions Get(string name) => _options;
Microsoft.AspNetCore.HttpLogging.Tests (1)
OptionsWrapperMonitor.cs (1)
23public T Get(string name) => CurrentValue;
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
StaticOptionsMonitor.cs (1)
18public T Get(string? name)
Microsoft.Extensions.Logging (1)
StaticFilterOptionsMonitor.cs (1)
18public LoggerFilterOptions Get(string? name) => CurrentValue;
Microsoft.Extensions.Logging.Console (1)
FormatterOptionsMonitor.cs (1)
21public TOptions Get(string? name) => _options;
Microsoft.Extensions.Options (1)
OptionsMonitor.cs (1)
89public virtual TOptions Get(string? name)
Microsoft.Extensions.Telemetry.Tests (2)
Logging\ExtendedLoggerTests.cs (1)
957public T Get(string? name) => CurrentValue;
Logging\SerialExtendedLoggerTests.cs (1)
97public T Get(string? name) => CurrentValue;
99 references to Get
Aspire.Azure.AI.OpenAI.Tests (1)
AspireAzureAIOpenAIExtensionsTests.cs (1)
191var options = host.Services.GetRequiredService<IOptionsMonitor<AzureOpenAIClientOptions>>().Get(useKeyed ? "openai" : "Default");
Aspire.Keycloak.Authentication.Tests (8)
AspireKeycloakExtensionTests.cs (8)
31.Get(JwtBearerDefaults.AuthenticationScheme)); 50host.Services.GetRequiredService<IOptionsMonitor<JwtBearerOptions>>().Get(scheme)); 71.Get(JwtBearerDefaults.AuthenticationScheme); 93.Get(scheme); 112.Get(OpenIdConnectDefaults.AuthenticationScheme)); 131host.Services.GetRequiredService<IOptionsMonitor<OpenIdConnectOptions>>().Get(scheme)); 153.Get(OpenIdConnectDefaults.AuthenticationScheme); 176.Get(scheme);
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 (2)
AspireRedisExtensions.cs (1)
157serviceProvider.GetRequiredService<IOptionsMonitor<ConfigurationOptions>>().Get(optionsName);
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\StackExchangeRedisInstrumentation.cs (1)
44var options = this.options.Get(name);
Aspire.StackExchange.Redis.Tests (1)
AspireRedisExtensionsTests.cs (1)
194host.Services.GetRequiredService<IOptionsMonitor<ConfigurationOptions>>().Get("redis") :
HealthChecksSample (1)
GCInfoHealthCheck.cs (1)
51var options = _options.Get(context.Registration.Name);
Microsoft.AspNetCore.Authentication (1)
AuthenticationHandler.cs (1)
155Options = OptionsMonitor.Get(Scheme.Name);
Microsoft.AspNetCore.Authentication.Negotiate (1)
Internal\NegotiateOptionsValidationStartupFilter.cs (1)
25var options = builder.ApplicationServices.GetRequiredService<IOptionsMonitor<NegotiateOptions>>().Get(_authenticationScheme);
Microsoft.AspNetCore.Authentication.Test (12)
AuthenticationMiddlewareTests.cs (1)
179var options = app.Services.GetService<IOptionsMonitor<JwtBearerOptions>>().Get(JwtBearerDefaults.AuthenticationScheme);
CookieTests.cs (1)
293Assert.Throws<OptionsValidationException>(() => options.Get(CookieAuthenticationDefaults.AuthenticationScheme));
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);
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
126var refreshTokenProtector = bearerTokenOptions.Get(IdentityConstants.BearerScheme).RefreshTokenProtector;
Microsoft.AspNetCore.Identity.Test (4)
IdentityOptionsTest.cs (4)
87Assert.Equal("a", options.Get(IdentityConstants.ApplicationScheme).Cookie.Name); 88Assert.Equal("b", options.Get(IdentityConstants.ExternalScheme).Cookie.Name); 89Assert.Equal("c", options.Get(IdentityConstants.TwoFactorRememberMeScheme).Cookie.Name); 90Assert.Equal("d", options.Get(IdentityConstants.TwoFactorUserIdScheme).Cookie.Name);
Microsoft.AspNetCore.OpenApi (2)
Extensions\OpenApiEndpointRouteBuilderExtensions.cs (1)
47var documentOptions = options.Get(documentName);
Services\OpenApiDocumentProvider.cs (1)
29var namedOption = options.Get(documentName);
Microsoft.AspNetCore.OpenApi.Tests (3)
Services\OpenApiDocumentService\OpenApiDocumentServiceTests.Info.cs (1)
62openApiOptions.Setup(o => o.Get(It.IsAny<string>())).Returns(new OpenApiOptions());
Services\OpenApiDocumentServiceTestsBase.cs (2)
86openApiOptions.Setup(o => o.Get(It.IsAny<string>())).Returns(new OpenApiOptions()); 122options.Setup(o => o.Get(It.IsAny<string>())).Returns(openApiOptions);
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesExtensions.cs (1)
51var options = provider.GetRequiredService<IOptionsMonitor<TcpEndpointProbesOptions>>().Get(name);
Microsoft.Extensions.Diagnostics.Probes.Tests (15)
KubernetesProbesExtensionsTests.cs (9)
48var livenessConfig = config.Get(ProbeTags.Liveness); 54var startupConfig = config.Get(ProbeTags.Startup); 60var readinessConfig = config.Get(ProbeTags.Readiness); 86Assert.Equal(1, config.Get(ProbeTags.Liveness).TcpPort); 87Assert.Equal(2, config.Get(ProbeTags.Startup).TcpPort); 88Assert.Equal(3, config.Get(ProbeTags.Readiness).TcpPort); 114Assert.Equal(1, config.Get(ProbeTags.Liveness).TcpPort); 115Assert.Equal(2, config.Get(ProbeTags.Startup).TcpPort); 116Assert.Equal(3, config.Get(ProbeTags.Readiness).TcpPort);
TcpEndpointProbesExtensionsTests.cs (6)
97Assert.NotNull(config.Get("Liveness")); 98Assert.Equal(TimeSpan.FromSeconds(5), config.Get("Liveness").HealthAssessmentPeriod); 149Assert.NotNull(configuration.Get("Liveness")); 150Assert.Equal(1234, configuration.Get("Liveness").TcpPort); 170Assert.NotNull(config.Get("Liveness")); 171Assert.NotNull(config.Get("Readiness"));
Microsoft.Extensions.Http (4)
DefaultHttpClientFactory.cs (2)
110HttpClientFactoryOptions options = _optionsMonitor.Get(name); 136HttpClientFactoryOptions options = _optionsMonitor.Get(name);
DefaultHttpMessageHandlerBuilder.cs (1)
73TimeSpan lifetime = optionsMonitor.Get(_name).HandlerLifetime;
Logging\LoggingHttpMessageHandlerBuilderFilter.cs (1)
41HttpClientFactoryOptions options = _optionsMonitor.Get(builder.Name);
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\OptionsExtensions.cs (1)
27return optionsMonitor.Get(serviceKey);
Microsoft.Extensions.Http.Diagnostics.Tests (16)
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 (1)
33.Setup(monitor => monitor.Get(key))
Microsoft.Extensions.Http.Resilience (3)
Internal\NamedOptionsCache.cs (1)
17Options = optionsMonitor.Get(optionsName);
Resilience\Internal\PipelineKeyProviderHelper.cs (1)
28return provider.GetRequiredService<IOptionsMonitor<PipelineKeyOptions>>().Get(pipelineName).KeyProvider;
Resilience\ResilienceHttpClientBuilderExtensions.StandardResilience.cs (1)
80var options = monitor.Get(optionsName);
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); 144.Get(Builder.Name);
Routing\RoutingStrategyTest.cs (1)
155.Get(name ?? Builder.Name).RoutingStrategyProvider!;
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (8)
DependencyInjectionExtensionsTests.cs (8)
56Assert.Equal(2048, sut.Get(typeof(TestClass).FullName!).Capacity); 57Assert.Equal(4096, sut.Get(typeof(TestDependency).FullName!).Capacity); 72Assert.Equal(DependencyInjectionPoolOptions.DefaultCapacity, options.Get(null).Capacity); 73Assert.Equal(DependencyInjectionPoolOptions.DefaultCapacity, options.Get(typeof(object).FullName!).Capacity); 74Assert.Equal(2048, options.Get(typeof(TestClass).FullName!).Capacity); 75Assert.Equal(4096, options.Get(typeof(TestDependency).FullName!).Capacity); 122Assert.Equal(64, optionsMonitor.Get(typeof(TestDependency).FullName).Capacity); 152Assert.Equal(64, optionsMonitor.Get(typeof(ITestClass).FullName).Capacity);
Microsoft.Extensions.Options (1)
OptionsBuilderExtensions.cs (1)
35vo._validators[(typeof(TOptions), optionsBuilder.Name)] = () => options.Get(optionsBuilder.Name);
OpenIdConnectSample (1)
Startup.cs (1)
250var options = optionsMonitor.Get(OpenIdConnectDefaults.AuthenticationScheme);
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));