29 references to AddOptions
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
159builder.Services.AddOptions<DashboardOptions>()
Aspire.Hosting (2)
Dashboard\DashboardServiceHost.cs (1)
79builder.Services.AddOptions<ResourceServiceOptions>()
DistributedApplicationBuilder.cs (1)
269_innerBuilder.Services.AddOptions<TransportOptions>().ValidateOnStart().PostConfigure(MapTransportOptionsFromCustomKeys);
Aspire.Hosting.Azure (1)
Provisioning\AzureProvisionerExtensions.cs (1)
28builder.Services.AddOptions<AzureProvisionerOptions>()
Aspire.StackExchange.Redis.DistributedCaching (1)
AspireRedisDistributedCacheExtensions.cs (1)
67builder.Services.AddOptions<RedisCacheOptions>() // note that RedisCacheOptions doesn't support named options
Aspire.StackExchange.Redis.OutputCaching (1)
AspireRedisOutputCacheExtensions.cs (1)
66builder.Services.AddOptions<RedisOutputCacheOptions>() // note that RedisOutputCacheOptions doesn't support named options
Microsoft.AspNetCore.CookiePolicy (1)
CookiePolicyServiceCollectionExtensions.cs (1)
38services.AddOptions<CookiePolicyOptions>().Configure(configureOptions);
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerServiceCollectionExtensions.cs (1)
40services.AddOptions<ExceptionHandlerOptions>().Configure(configureOptions);
Microsoft.AspNetCore.Http.Extensions.Tests (6)
ProblemDetailsServiceCollectionExtensionsTest.cs (6)
90collection.AddOptions<JsonOptions>(); 111collection.AddOptions<JsonOptions>(); 143collection.AddOptions<JsonOptions>(); 176collection.AddOptions<JsonOptions>(); 196collection.AddOptions<JsonOptions>(); 218collection.AddOptions<JsonOptions>();
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingServiceExtensions.cs (1)
26services.AddOptions<CertificateForwardingOptions>().Validate(o => !string.IsNullOrEmpty(o.CertificateHeader), "CertificateForwarderOptions.CertificateHeader cannot be null or empty.");
Microsoft.AspNetCore.Localization (1)
RequestLocalizationServiceCollectionExtensions.cs (1)
38services.AddOptions<RequestLocalizationOptions>().Configure(configureOptions);
Microsoft.Extensions.Compliance.Redaction (1)
RedactionServiceCollectionExtensions.cs (1)
39.AddOptions<RedactorProviderOptions>()
Microsoft.Extensions.DependencyInjection.AutoActivation (4)
AutoActivationExtensions.cs (2)
31.AddOptions<AutoActivatorOptions>() 65.AddOptions<AutoActivatorOptions>()
AutoActivationExtensions.Keyed.cs (2)
30.AddOptions<AutoActivatorOptions>() 68.AddOptions<AutoActivatorOptions>()
Microsoft.Extensions.Diagnostics (1)
Metrics\MetricsServiceExtensions.cs (1)
36services.AddOptions<NoOpOptions>().ValidateOnStart();
Microsoft.Extensions.Http.Diagnostics (1)
Latency\HttpClientLatencyTelemetryExtensions.cs (1)
32_ = services.AddOptions<HttpClientLatencyTelemetryOptions>();
Microsoft.Extensions.Options (1)
OptionsBuilderExtensions.cs (1)
30optionsBuilder.Services.AddOptions<StartupValidatorOptions>()
Microsoft.Extensions.ServiceDiscovery.Dns (2)
ServiceDiscoveryDnsServiceCollectionExtensions.cs (2)
51var options = services.AddOptions<DnsSrvServiceEndpointProviderOptions>(); 87var options = services.AddOptions<DnsServiceEndpointProviderOptions>();
Microsoft.Extensions.Telemetry (3)
Latency\LatencyConsoleExtensions.cs (1)
28_ = services.AddOptions<LatencyConsoleOptions>();
Latency\LatencyContextExtensions.cs (1)
26_ = services.AddOptions<LatencyContextOptions>();
Logging\LoggingRedactionExtensions.cs (1)
55_ = builder.Services.AddOptions<LoggerRedactionOptions>().Bind(section);