1 interface inheriting from IConfigureOptions
Microsoft.Extensions.Options (1)
IConfigureNamedOptions.cs (1)
10public interface IConfigureNamedOptions<in TOptions> : IConfigureOptions<TOptions> where TOptions : class
46 implementations of IConfigureOptions
Microsoft.AspNetCore (1)
ForwardedHeadersOptionsSetup.cs (1)
11internal sealed class ForwardedHeadersOptionsSetup : IConfigureOptions<ForwardedHeadersOptions>
Microsoft.AspNetCore.Antiforgery (1)
Internal\AntiforgeryOptionsSetup.cs (1)
12internal sealed class AntiforgeryOptionsSetup : IConfigureOptions<AntiforgeryOptions>
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenConfigureJsonOptions.cs (1)
9internal sealed class BearerTokenConfigureJsonOptions : IConfigureOptions<JsonOptions>
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitOptionsJavaScriptInitializersConfiguration.cs (1)
10internal sealed class CircuitOptionsJavaScriptInitializersConfiguration : IConfigureOptions<CircuitOptions>
Circuits\CircuitOptionsJSInteropDetailedErrorsConfiguration.cs (1)
10internal sealed class CircuitOptionsJSInteropDetailedErrorsConfiguration : IConfigureOptions<CircuitOptions>
Microsoft.AspNetCore.DataProtection (2)
Internal\DataProtectionOptionsSetup.cs (1)
9internal sealed class DataProtectionOptionsSetup : IConfigureOptions<DataProtectionOptions>
Internal\KeyManagementOptionsSetup.cs (1)
14internal sealed class KeyManagementOptionsSetup : IConfigureOptions<KeyManagementOptions>
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
GrpcJsonTranscodingServiceExtensions.cs (1)
50private sealed class GrpcJsonTranscodingOptionsSetup : IConfigureOptions<GrpcJsonTranscodingOptions>
Microsoft.AspNetCore.Http.Connections (1)
ConnectionOptionsSetup.cs (1)
11public class ConnectionOptionsSetup : IConfigureOptions<ConnectionOptions>
Microsoft.AspNetCore.Http.Extensions (1)
ProblemDetailsJsonOptionsSetup.cs (1)
15internal sealed class ProblemDetailsJsonOptionsSetup : IConfigureOptions<JsonOptions>
Microsoft.AspNetCore.Identity (1)
IdentityEndpointsJsonOptionsSetup.cs (1)
10internal sealed class IdentityEndpointsJsonOptionsSetup : IConfigureOptions<JsonOptions>
Microsoft.AspNetCore.Mvc.Core (3)
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
11internal sealed class ApiBehaviorOptionsSetup : IConfigureOptions<ApiBehaviorOptions>
DependencyInjection\MvcCoreRouteOptionsSetup.cs (1)
13internal sealed class MvcCoreRouteOptionsSetup : IConfigureOptions<RouteOptions>
Infrastructure\MvcCoreMvcOptionsSetup.cs (1)
23internal sealed class MvcCoreMvcOptionsSetup : IConfigureOptions<MvcOptions>, IPostConfigureOptions<MvcOptions>
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DependencyInjection\MvcDataAnnotationsLocalizationOptionsSetup.cs (1)
12internal sealed class MvcDataAnnotationsLocalizationOptionsSetup : IConfigureOptions<MvcDataAnnotationsLocalizationOptions>
DependencyInjection\MvcDataAnnotationsMvcOptionsSetup.cs (1)
14internal sealed class MvcDataAnnotationsMvcOptionsSetup : IConfigureOptions<MvcOptions>
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (1)
18internal sealed class XmlDataContractSerializerMvcOptionsSetup : IConfigureOptions<MvcOptions>
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (1)
16internal sealed class XmlSerializerMvcOptionsSetup : IConfigureOptions<MvcOptions>
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
DependencyInjection\NewtonsoftJsonMvcOptionsSetup.cs (1)
20internal sealed class NewtonsoftJsonMvcOptionsSetup : IConfigureOptions<MvcOptions>
Microsoft.AspNetCore.Mvc.Razor (2)
DependencyInjection\MvcRazorMvcViewOptionsSetup.cs (1)
13internal sealed class MvcRazorMvcViewOptionsSetup : IConfigureOptions<MvcViewOptions>
RazorViewEngineOptionsSetup.cs (1)
8internal sealed class RazorViewEngineOptionsSetup : IConfigureOptions<RazorViewEngineOptions>
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
DependencyInjection\MvcRazorRuntimeCompilationOptionsSetup.cs (1)
9internal sealed class MvcRazorRuntimeCompilationOptionsSetup : IConfigureOptions<MvcRazorRuntimeCompilationOptions>
Microsoft.AspNetCore.Mvc.RazorPages (2)
DependencyInjection\RazorPagesOptionsSetup.cs (1)
10internal sealed class RazorPagesOptionsSetup : IConfigureOptions<RazorPagesOptions>
DependencyInjection\RazorPagesRazorViewEngineOptionsSetup.cs (1)
12internal sealed class RazorPagesRazorViewEngineOptionsSetup : IConfigureOptions<RazorViewEngineOptions>
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DependencyInjection\MvcViewOptionsSetup.cs (1)
14internal sealed class MvcViewOptionsSetup : IConfigureOptions<MvcViewOptions>
DependencyInjection\TempDataMvcOptionsSetup.cs (1)
13internal sealed class TempDataMvcOptionsSetup : IConfigureOptions<MvcOptions>
Microsoft.AspNetCore.OpenApi (1)
Schemas\OpenApiSchemaJsonOptions.cs (1)
9internal sealed class OpenApiSchemaJsonOptions : IConfigureOptions<JsonOptions>
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheOptionsSetup.cs (1)
8internal sealed class OutputCacheOptionsSetup : IConfigureOptions<OutputCacheOptions>
Microsoft.AspNetCore.Routing (3)
ConfigureRouteHandlerOptions.cs (1)
9internal sealed class ConfigureRouteHandlerOptions : IConfigureOptions<RouteHandlerOptions>
ConfigureRouteOptions.cs (1)
9internal sealed class ConfigureRouteOptions : IConfigureOptions<RouteOptions>
RegexInlineRouteConstraintSetup.cs (1)
10internal sealed class RegexInlineRouteConstraintSetup : IConfigureOptions<RouteOptions>
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\KestrelServerOptionsSetup.cs (1)
8internal sealed class KestrelServerOptionsSetup : IConfigureOptions<KestrelServerOptions>
Microsoft.AspNetCore.SignalR.Core (2)
HubOptionsSetup.cs (1)
13public class HubOptionsSetup : IConfigureOptions<HubOptions>
HubOptionsSetup`T.cs (1)
12public class HubOptionsSetup<THub> : IConfigureOptions<HubOptions<THub>> where THub : Hub
Microsoft.Extensions.Diagnostics (1)
Metrics\Configuration\MetricsConfigureOptions.cs (1)
11internal sealed class MetricsConfigureOptions : IConfigureOptions<MetricsOptions>
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetimeHostBuilderExtensions.cs (1)
125private sealed class EventLogSettingsSetup : IConfigureOptions<EventLogSettings>
Microsoft.Extensions.Logging.AzureAppServices (4)
BatchLoggerConfigureOptions.cs (1)
9internal class BatchLoggerConfigureOptions : IConfigureOptions<BatchingLoggerOptions>
BlobLoggerConfigureOptions.cs (1)
10internal sealed class BlobLoggerConfigureOptions : BatchLoggerConfigureOptions, IConfigureOptions<AzureBlobLoggerOptions>
ConfigurationBasedLevelSwitcher.cs (1)
10internal sealed class ConfigurationBasedLevelSwitcher : IConfigureOptions<LoggerFilterOptions>
FileLoggerConfigureOptions.cs (1)
10internal sealed class FileLoggerConfigureOptions : BatchLoggerConfigureOptions, IConfigureOptions<AzureFileLoggerOptions>
Microsoft.Extensions.Logging.Configuration (1)
LoggerFilterConfigureOptions.cs (1)
10internal sealed class LoggerFilterConfigureOptions : IConfigureOptions<LoggerFilterOptions>
Microsoft.Extensions.Logging.Console (3)
ConsoleFormatterConfigureOptions.cs (1)
19internal sealed class ConsoleFormatterConfigureOptions : IConfigureOptions<ConsoleFormatterOptions>
ConsoleLoggerConfigureOptions.cs (1)
19internal sealed class ConsoleLoggerConfigureOptions : IConfigureOptions<ConsoleLoggerOptions>
ConsoleLoggerExtensions.Obsolete.cs (1)
129private sealed class ConsoleLoggerSettingsAdapter : IConfigureOptions<ConsoleLoggerOptions>, IOptionsChangeTokenSource<ConsoleLoggerOptions>
Microsoft.Extensions.Logging.EventSource (1)
EventLogFiltersConfigureOptions.cs (1)
9internal sealed class EventLogFiltersConfigureOptions : IConfigureOptions<LoggerFilterOptions>
Microsoft.Extensions.Options (1)
ConfigureOptions.cs (1)
12public class ConfigureOptions<TOptions> : IConfigureOptions<TOptions> where TOptions : class
158 references to IConfigureOptions
Aspire.Hosting (8)
Codespaces\CodespacesOptions.cs (1)
42internal class ConfigureCodespacesOptions(IConfiguration configuration) : IConfigureOptions<CodespacesOptions>
Dashboard\DashboardOptions.cs (1)
21internal class ConfigureDefaultDashboardOptions(IConfiguration configuration, IOptions<DcpOptions> dcpOptions) : IConfigureOptions<DashboardOptions>
Dashboard\DashboardServiceHost.cs (1)
55IConfigureOptions<LoggerFilterOptions> loggerOptions,
Dcp\DcpOptions.cs (1)
102IConfiguration configuration) : IConfigureOptions<DcpOptions>
DistributedApplicationBuilder.cs (4)
275_innerBuilder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<DashboardOptions>, ConfigureDefaultDashboardOptions>()); 283_innerBuilder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<DcpOptions>, ConfigureDefaultDcpOptions>()); 292_innerBuilder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<CodespacesOptions>, ConfigureCodespacesOptions>()); 346_innerBuilder.Services.AddSingleton<IConfigureOptions<HealthCheckPublisherOptions>>(sp =>
Aspire.StackExchange.Redis (1)
AspireRedisExtensions.cs (1)
202public ConfigurationOptionsFactory(IServiceProvider serviceProvider, IEnumerable<IConfigureOptions<ConfigurationOptions>> setups, IEnumerable<IPostConfigureOptions<ConfigurationOptions>> postConfigures, IEnumerable<IValidateOptions<ConfigurationOptions>> validations)
Cookies (1)
Startup.cs (1)
44services.AddSingleton<IConfigureOptions<CookieAuthenticationOptions>, ConfigureMyCookie>();
CustomEncryptorSample (1)
CustomBuilderExtensions.cs (1)
18builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(serviceProvider =>
Microsoft.AspNetCore (1)
WebHost.cs (1)
270services.AddTransient<IConfigureOptions<ForwardedHeadersOptions>, ForwardedHeadersOptionsSetup>();
Microsoft.AspNetCore.Antiforgery (1)
AntiforgeryServiceCollectionExtensions.cs (1)
29ServiceDescriptor.Transient<IConfigureOptions<AntiforgeryOptions>, AntiforgeryOptionsSetup>());
Microsoft.AspNetCore.Authentication.BearerToken (2)
BearerTokenExtensions.cs (2)
68builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<JsonOptions>, BearerTokenConfigureJsonOptions>()); 69builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<BearerTokenOptions>, BearerTokenConfigureOptions>());
Microsoft.AspNetCore.Authentication.JwtBearer (1)
JwtBearerExtensions.cs (1)
77builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<JwtBearerOptions>, JwtBearerConfigureOptions>());
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectExtensions.cs (1)
71builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<OpenIdConnectOptions>, OpenIdConnectConfigureOptions>());
Microsoft.AspNetCore.Components.Server (2)
DependencyInjection\ComponentServiceCollectionExtensions.cs (2)
87services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<CircuitOptions>, CircuitOptionsJSInteropDetailedErrorsConfiguration>()); 88services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<CircuitOptions>, CircuitOptionsJavaScriptInitializersConfiguration>());
Microsoft.AspNetCore.DataProtection (10)
DataProtectionBuilderExtensions.cs (8)
88builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 114builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 173builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 197builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 220builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 255builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 326builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services => 380builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services =>
DataProtectionServiceCollectionExtensions.cs (2)
69ServiceDescriptor.Singleton<IConfigureOptions<KeyManagementOptions>, KeyManagementOptionsSetup>()); 73ServiceDescriptor.Transient<IConfigureOptions<DataProtectionOptions>, DataProtectionOptionsSetup>());
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (1)
EntityFrameworkCoreDataProtectionExtensions.cs (1)
27builder.Services.AddSingleton<IConfigureOptions<KeyManagementOptions>>(services =>
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
GrpcJsonTranscodingServiceExtensions.cs (1)
29builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<GrpcJsonTranscodingOptions>, GrpcJsonTranscodingOptionsSetup>());
Microsoft.AspNetCore.Http.Connections (1)
ConnectionsDependencyInjectionExtensions.cs (1)
25services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<ConnectionOptions>, ConnectionOptionsSetup>());
Microsoft.AspNetCore.Http.Extensions (1)
ProblemDetailsServiceCollectionExtensions.cs (1)
44services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<JsonOptions>, ProblemDetailsJsonOptionsSetup>());
Microsoft.AspNetCore.Http.Extensions.Tests (2)
ProblemDetailsServiceCollectionExtensionsTest.cs (2)
30Assert.Single(collection, (sd) => sd.ServiceType == typeof(IConfigureOptions<JsonOptions>) && sd.ImplementationType == typeof(ProblemDetailsJsonOptionsSetup)); 46Assert.Single(collection, (sd) => sd.ServiceType == typeof(IConfigureOptions<JsonOptions>) && sd.ImplementationType == typeof(ProblemDetailsJsonOptionsSetup));
Microsoft.AspNetCore.Identity (1)
IdentityBuilderExtensions.cs (1)
102builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<JsonOptions>, IdentityEndpointsJsonOptionsSetup>());
Microsoft.AspNetCore.Identity.Test (2)
IdentityOptionsTest.cs (2)
44var setup = serviceProvider.GetRequiredService<IConfigureOptions<IdentityOptions>>();
Microsoft.AspNetCore.Mvc.Core (3)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (3)
135ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, MvcCoreMvcOptionsSetup>()); 139ServiceDescriptor.Transient<IConfigureOptions<ApiBehaviorOptions>, ApiBehaviorOptionsSetup>()); 141ServiceDescriptor.Transient<IConfigureOptions<RouteOptions>, MvcCoreRouteOptionsSetup>());
Microsoft.AspNetCore.Mvc.Core.Test (3)
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (3)
235typeof(IConfigureOptions<MvcOptions>), 249typeof(IConfigureOptions<RouteOptions>), 256typeof(IConfigureOptions<ApiBehaviorOptions>),
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsLocalizationServices.cs (1)
26<IConfigureOptions<MvcDataAnnotationsLocalizationOptions>,
DependencyInjection\MvcDataAnnotationsMvcCoreBuilderExtensions.cs (1)
62ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, MvcDataAnnotationsMvcOptionsSetup>());
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (3)
MvcDataAnnotationsMvcOptionsSetup.cs (3)
23services.AddSingleton<IConfigureOptions<MvcOptions>, MvcDataAnnotationsMvcOptionsSetup>(); 28var optionsSetup = serviceProvider.GetRequiredService<IConfigureOptions<MvcOptions>>();
Microsoft.AspNetCore.Mvc.Formatters.Xml (6)
DependencyInjection\MvcXmlMvcBuilderExtensions.cs (2)
97ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlDataContractSerializerMvcOptionsSetup>()); 104ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlSerializerMvcOptionsSetup>());
DependencyInjection\MvcXmlMvcCoreBuilderExtensions.cs (2)
98ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlDataContractSerializerMvcOptionsSetup>()); 105ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlSerializerMvcOptionsSetup>());
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (1)
15/// A <see cref="IConfigureOptions{TOptions}"/> implementation which will add the
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (1)
13/// A <see cref="IConfigureOptions{TOptions}"/> implementation which will add the
Microsoft.AspNetCore.Mvc.Localization.Test (4)
MvcLocalizationMvcBuilderExtensionsTest.cs (2)
60sd => sd.ServiceType == typeof(IConfigureOptions<MvcDataAnnotationsLocalizationOptions>)); 65sd => sd.ServiceType == typeof(IConfigureOptions<RazorViewEngineOptions>));
MvcLocalizationMvcCoreBuilderExtensionsTest.cs (2)
60sd => sd.ServiceType == typeof(IConfigureOptions<MvcDataAnnotationsLocalizationOptions>)); 65sd => sd.ServiceType == typeof(IConfigureOptions<RazorViewEngineOptions>));
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
DependencyInjection\NewtonsoftJsonMvcCoreBuilderExtensions.cs (1)
60ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, NewtonsoftJsonMvcOptionsSetup>());
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
DependencyInjection\NewtonsoftJsonMvcBuilderExtensionsTest.cs (1)
26Assert.Single(services, d => d.ServiceType == typeof(IConfigureOptions<MvcNewtonsoftJsonOptions>));
DependencyInjection\NewtonsoftJsonMvcCoreBuilderExtensionsTest.cs (1)
30Assert.Single(services, d => d.ServiceType == typeof(IConfigureOptions<MvcNewtonsoftJsonOptions>));
Microsoft.AspNetCore.Mvc.Razor (2)
DependencyInjection\MvcRazorMvcCoreBuilderExtensions.cs (2)
126ServiceDescriptor.Transient<IConfigureOptions<MvcViewOptions>, MvcRazorMvcViewOptionsSetup>()); 129ServiceDescriptor.Transient<IConfigureOptions<RazorViewEngineOptions>, RazorViewEngineOptionsSetup>());
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
DependencyInjection\RazorRuntimeCompilationMvcCoreBuilderExtensions.cs (1)
58ServiceDescriptor.Transient<IConfigureOptions<MvcRazorRuntimeCompilationOptions>, MvcRazorRuntimeCompilationOptionsSetup>());
Microsoft.AspNetCore.Mvc.RazorPages (2)
DependencyInjection\MvcRazorPagesMvcCoreBuilderExtensions.cs (2)
83ServiceDescriptor.Transient<IConfigureOptions<RazorViewEngineOptions>, RazorPagesRazorViewEngineOptionsSetup>()); 86ServiceDescriptor.Transient<IConfigureOptions<RazorPagesOptions>, RazorPagesOptionsSetup>());
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
DependencyInjection\MvcRazorPagesMvcBuilderExtensionsTest.cs (1)
19.AddSingleton<IConfigureOptions<RazorPagesOptions>, RazorPagesOptionsSetup>();
Microsoft.AspNetCore.Mvc.Test (7)
MvcServiceCollectionExtensionsTest.cs (7)
246Assert.Contains(services, s => s.ServiceType == typeof(IConfigureOptions<MvcOptions>) && s.ImplementationType == typeof(MvcDataAnnotationsMvcOptionsSetup)); 452item => item.ServiceType == typeof(IConfigureOptions<CookieTempDataProviderOptions>)); 478typeof(IConfigureOptions<MvcOptions>), 487typeof(IConfigureOptions<RouteOptions>), 496typeof(IConfigureOptions<ApiBehaviorOptions>), 503typeof(IConfigureOptions<MvcViewOptions>), 511typeof(IConfigureOptions<RazorViewEngineOptions>),
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (2)
137ServiceDescriptor.Transient<IConfigureOptions<MvcViewOptions>, MvcViewOptionsSetup>()); 139ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, TempDataMvcOptionsSetup>());
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (2)
61item => item.ServiceType == typeof(IConfigureOptions<CookieTempDataProviderOptions>)); 90item => item.ServiceType == typeof(IConfigureOptions<CookieTempDataProviderOptions>));
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensionsTest.cs (2)
55item => item.ServiceType == typeof(IConfigureOptions<CookieTempDataProviderOptions>)); 86item => item.ServiceType == typeof(IConfigureOptions<CookieTempDataProviderOptions>));
Microsoft.AspNetCore.OpenApi (1)
Extensions\OpenApiServiceCollectionExtensions.cs (1)
114services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<JsonOptions>, OpenApiSchemaJsonOptions>());
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheServiceCollectionExtensions.cs (1)
27services.AddTransient<IConfigureOptions<OutputCacheOptions>, OutputCacheOptionsSetup>();
Microsoft.AspNetCore.Routing (3)
DependencyInjection\RoutingServiceCollectionExtensions.cs (3)
31services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<RouteOptions>, RegexInlineRouteConstraintSetup>()); 71services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<RouteOptions>, ConfigureRouteOptions>( 118services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<RouteHandlerOptions>, ConfigureRouteHandlerOptions>());
Microsoft.AspNetCore.Server.Kestrel (3)
WebHostBuilderKestrelExtensions.cs (3)
87services.AddTransient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>(); 134services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>()); 170services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<KestrelServerOptions>, KestrelServerOptionsSetup>());
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelServerOptions.cs (1)
455throw new InvalidOperationException($"{nameof(ApplicationServices)} must not be null. This is normally set automatically via {nameof(IConfigureOptions<KestrelServerOptions>)}.");
Microsoft.AspNetCore.SignalR (2)
SignalRDependencyInjectionExtensions.cs (2)
27signalrBuilder.Services.AddSingleton<IConfigureOptions<HubOptions<THub>>, HubOptionsSetup<THub>>(); 46services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<HubOptions>, HubOptionsSetup>());
Microsoft.AspNetCore.SignalR.Client (1)
HubConnectionBuilderHttpExtensions.cs (1)
161hubConnectionBuilder.Services.AddSingleton<IConfigureOptions<HttpConnectionOptions>, HubProtocolDerivedHttpOptionsConfigurer>();
Microsoft.AspNetCore.SignalR.Tests (2)
AddSignalRTests.cs (2)
36serviceCollection.AddSingleton<IConfigureOptions<HubOptions>>(hubOptions); 47Assert.Equal(hubOptions, serviceProvider.GetRequiredService<IConfigureOptions<HubOptions>>());
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (3)
1753Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IConfigureOptions<LoggerFactoryOptions>))); 1762Assert.Single(app.Services.GetRequiredService<IEnumerable<IConfigureOptions<LoggerFactoryOptions>>>()); 1773Assert.DoesNotContain(builder.Services, descriptor => descriptor.ServiceType == typeof(IConfigureOptions<LoggerFactoryOptions>));
Microsoft.Extensions.Diagnostics (3)
Metrics\Configuration\MetricsBuilderConfigurationExtensions.cs (1)
37builder.Services.AddSingleton<IConfigureOptions<MetricsOptions>>(new MetricsConfigureOptions(configuration));
Metrics\MetricsServiceExtensions.cs (2)
38services.TryAddSingleton<IConfigureOptions<NoOpOptions>, SubscriptionActivator>(); 73private sealed class SubscriptionActivator(MetricsSubscriptionManager manager) : IConfigureOptions<NoOpOptions>
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetimeHostBuilderExtensions.cs (1)
121services.AddSingleton<IConfigureOptions<EventLogSettings>, EventLogSettingsSetup>();
Microsoft.Extensions.Http (2)
DependencyInjection\DefaultHttpClientBuilderServiceCollection.cs (1)
27if (item.ServiceType != typeof(IConfigureOptions<HttpClientFactoryOptions>))
DependencyInjection\HttpClientBuilderExtensions.cs (1)
53builder.Services.AddTransient<IConfigureOptions<HttpClientFactoryOptions>>(services =>
Microsoft.Extensions.Logging (2)
LoggingBuilderExtensions.cs (1)
24builder.Services.Add(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>>(
LoggingServiceCollectionExtensions.cs (1)
41services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>>(
Microsoft.Extensions.Logging.AzureAppServices (4)
AzureAppServicesLoggerFactoryExtensions.cs (4)
71services.AddSingleton<IConfigureOptions<LoggerFilterOptions>>(CreateFileFilterConfigureOptions(config)); 72services.AddSingleton<IConfigureOptions<AzureFileLoggerOptions>>(new FileLoggerConfigureOptions(config, context)); 80services.AddSingleton<IConfigureOptions<LoggerFilterOptions>>(CreateBlobFilterConfigureOptions(config)); 81services.AddSingleton<IConfigureOptions<AzureBlobLoggerOptions>>(new BlobLoggerConfigureOptions(config, context, configureBlobLoggerOptions));
Microsoft.Extensions.Logging.Configuration (2)
LoggerProviderConfigurationExtensions.cs (1)
29services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<TOptions>, LoggerProviderConfigureOptions<TOptions, TProvider>>());
LoggingBuilderExtensions.cs (1)
26builder.Services.AddSingleton<IConfigureOptions<LoggerFilterOptions>>(new LoggerFilterConfigureOptions(configuration));
Microsoft.Extensions.Logging.Console (5)
ConsoleLoggerExtensions.cs (3)
40builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<ConsoleLoggerOptions>, ConsoleLoggerConfigureOptions>()); 160where TConfigureOptions : class, IConfigureOptions<TOptions> 165builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<TOptions>, TConfigureOptions>());
ConsoleLoggerExtensions.Obsolete.cs (2)
141void IConfigureOptions<ConsoleLoggerOptions>.Configure(ConsoleLoggerOptions options) 157OptionsFactory<ConsoleLoggerOptions> factory = new(new IConfigureOptions<ConsoleLoggerOptions>[] { adapter }, Array.Empty<IPostConfigureOptions<ConsoleLoggerOptions>>());
Microsoft.Extensions.Logging.EventSource (1)
EventSourceLoggerFactoryExtensions.cs (1)
45builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<LoggerFilterOptions>, EventLogFiltersConfigureOptions>());
Microsoft.Extensions.ML (1)
MLOptions.cs (1)
39/// Note: This is run after all <see cref="IConfigureOptions{MLContextOptions}"/>.
Microsoft.Extensions.Options (19)
ConfigureOptions.cs (1)
9/// Implementation of <see cref="IConfigureOptions{TOptions}"/>.
IPostConfigureOptions.cs (1)
11/// These are run after all <see cref="IConfigureOptions{TOptions}"/>.
OptionsBuilder.cs (6)
52Services.AddSingleton<IConfigureOptions<TOptions>>(new ConfigureNamedOptions<TOptions>(Name, configureOptions)); 70Services.AddTransient<IConfigureOptions<TOptions>>(sp => 91Services.AddTransient<IConfigureOptions<TOptions>>(sp => 114Services.AddTransient<IConfigureOptions<TOptions>>( 144Services.AddTransient<IConfigureOptions<TOptions>>( 177Services.AddTransient<IConfigureOptions<TOptions>>(
OptionsFactory.cs (6)
18private readonly IConfigureOptions<TOptions>[] _setups; 27public OptionsFactory(IEnumerable<IConfigureOptions<TOptions>> setups, IEnumerable<IPostConfigureOptions<TOptions>> postConfigures) : this(setups, postConfigures, validations: Array.Empty<IValidateOptions<TOptions>>()) 36public OptionsFactory(IEnumerable<IConfigureOptions<TOptions>> setups, IEnumerable<IPostConfigureOptions<TOptions>> postConfigures, IEnumerable<IValidateOptions<TOptions>> validations) 43_setups = setups as IConfigureOptions<TOptions>[] ?? new List<IConfigureOptions<TOptions>>(setups).ToArray(); 58foreach (IConfigureOptions<TOptions> setup in _setups)
OptionsServiceCollectionExtensions.cs (5)
102services.AddSingleton<IConfigureOptions<TOptions>>(new ConfigureNamedOptions<TOptions>(name, configureOptions)); 159/// Registers a type that will have all of its <see cref="IConfigureOptions{TOptions}"/>, 178if (gtd == typeof(IConfigureOptions<>) || 205/// Registers a type that will have all of its <see cref="IConfigureOptions{TOptions}"/>, 234/// Registers an object that will have all of its <see cref="IConfigureOptions{TOptions}"/>,
Microsoft.Extensions.Options.ConfigurationExtensions (1)
OptionsConfigurationServiceCollectionExtensions.cs (1)
74return services.AddSingleton<IConfigureOptions<TOptions>>(new NamedConfigureFromConfigurationOptions<TOptions>(name, config, configureBinder));
Microsoft.Extensions.Options.Contextual (4)
Internal\ContextualOptionsFactory.cs (4)
26private readonly IConfigureOptions<TOptions>[] _setups; 39IEnumerable<IConfigureOptions<TOptions>> setups, 44_setups = setups as IConfigureOptions<TOptions>[] ?? setups.ToArray(); 62foreach (IConfigureOptions<TOptions> setup in _setups)
Microsoft.Extensions.Options.Contextual.Tests (11)
ContextualOptionsFactoryTests.cs (11)
25Enumerable.Empty<IConfigureOptions<List<string>>>(), 39Enumerable.Empty<IConfigureOptions<List<string>>>(), 52Enumerable.Empty<IConfigureOptions<List<string>>>(), 72Enumerable.Empty<IConfigureOptions<List<string>>>(), 93Enumerable.Empty<IConfigureOptions<List<string>>>(), 113Enumerable.Empty<IConfigureOptions<List<string>>>(), 126Enumerable.Empty<IConfigureOptions<List<string>>>(), 139Enumerable.Empty<IConfigureOptions<List<string>>>(), 196Enumerable.Empty<IConfigureOptions<List<string>>>(), 218Enumerable.Empty<IConfigureOptions<List<string>>>(), 243Enumerable.Empty<IConfigureOptions<List<string>>>(),
Sockets.BindTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (2)
96var configureOptions = sp.GetServices<IConfigureOptions<KestrelServerOptions>>(); 97foreach (var c in configureOptions)
Sockets.FunctionalTests (2)
src\Servers\Kestrel\shared\test\TransportTestHelpers\TestServer.cs (2)
96var configureOptions = sp.GetServices<IConfigureOptions<KestrelServerOptions>>(); 97foreach (var c in configureOptions)