3 implementations of IOptionsChangeTokenSource
Microsoft.Extensions.Logging.Console (1)
ConsoleLoggerExtensions.Obsolete.cs (1)
129private sealed class ConsoleLoggerSettingsAdapter : IConfigureOptions<ConsoleLoggerOptions>, IOptionsChangeTokenSource<ConsoleLoggerOptions>
Microsoft.Extensions.Logging.EventSource (1)
EventLogFiltersConfigureOptionsChangeSource.cs (1)
10internal sealed class EventLogFiltersConfigureOptionsChangeSource : IOptionsChangeTokenSource<LoggerFilterOptions>
Microsoft.Extensions.Options.ConfigurationExtensions (1)
ConfigurationChangeTokenSource.cs (1)
15public class ConfigurationChangeTokenSource<TOptions> : IOptionsChangeTokenSource<TOptions>
26 references to IOptionsChangeTokenSource
HostFilteringSample (1)
Startup.cs (1)
37services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(new ConfigurationChangeTokenSource<HostFilteringOptions>(Config));
Microsoft.AspNetCore (1)
WebHost.cs (1)
265services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(
Microsoft.AspNetCore.HostFiltering.Tests (1)
HostFilteringMiddlewareTests.cs (1)
242services.AddSingleton<IOptionsChangeTokenSource<HostFilteringOptions>>(new ConfigurationChangeTokenSource<HostFilteringOptions>(config));
Microsoft.AspNetCore.Tests (3)
WebApplicationTests.cs (3)
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>));
Microsoft.Extensions.Diagnostics (1)
Metrics\Configuration\MetricsBuilderConfigurationExtensions.cs (1)
38builder.Services.AddSingleton<IOptionsChangeTokenSource<MetricsOptions>>(new ConfigurationChangeTokenSource<MetricsOptions>(configuration));
Microsoft.Extensions.Logging.AzureAppServices (3)
AzureAppServicesLoggerFactoryExtensions.cs (3)
65services.AddSingleton<IOptionsChangeTokenSource<LoggerFilterOptions>>( 73services.AddSingleton<IOptionsChangeTokenSource<AzureFileLoggerOptions>>( 82services.AddSingleton<IOptionsChangeTokenSource<AzureBlobLoggerOptions>>(
Microsoft.Extensions.Logging.Configuration (2)
LoggerProviderConfigurationExtensions.cs (1)
30services.TryAddEnumerable(ServiceDescriptor.Singleton<IOptionsChangeTokenSource<TOptions>, LoggerProviderOptionsChangeTokenSource<TOptions, TProvider>>());
LoggingBuilderExtensions.cs (1)
27builder.Services.AddSingleton<IOptionsChangeTokenSource<LoggerFilterOptions>>(new ConfigurationChangeTokenSource<LoggerFilterOptions>(configuration));
Microsoft.Extensions.Logging.Console (6)
ConsoleLoggerExtensions.cs (2)
41builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOptionsChangeTokenSource<ConsoleLoggerOptions>, LoggerProviderOptionsChangeTokenSource<ConsoleLoggerOptions, ConsoleLoggerProvider>>()); 166builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOptionsChangeTokenSource<TOptions>, ConsoleLoggerFormatterOptionsChangeTokenSource<TFormatter, TOptions>>());
ConsoleLoggerExtensions.Obsolete.cs (4)
137IChangeToken IOptionsChangeTokenSource<ConsoleLoggerOptions>.GetChangeToken() => _settings.ChangeToken ?? NullChangeToken.Instance; 139string IOptionsChangeTokenSource<ConsoleLoggerOptions>.Name => Options.Options.DefaultName; 158IOptionsChangeTokenSource<ConsoleLoggerOptions>[] sources = new IOptionsChangeTokenSource<ConsoleLoggerOptions>[] { adapter };
Microsoft.Extensions.Logging.EventSource (1)
EventSourceLoggerFactoryExtensions.cs (1)
46builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOptionsChangeTokenSource<LoggerFilterOptions>, EventLogFiltersConfigureOptionsChangeSource>());
Microsoft.Extensions.Options (5)
OptionsMonitor.cs (5)
31public OptionsMonitor(IOptionsFactory<TOptions> factory, IEnumerable<IOptionsChangeTokenSource<TOptions>> sources, IOptionsMonitorCache<TOptions> cache) 36void RegisterSource(IOptionsChangeTokenSource<TOptions> source) 48if (sources is IOptionsChangeTokenSource<TOptions>[] sourcesArray) 50foreach (IOptionsChangeTokenSource<TOptions> source in sourcesArray) 57foreach (IOptionsChangeTokenSource<TOptions> source in sources)
Microsoft.Extensions.Options.ConfigurationExtensions (2)
OptionsBuilderConfigurationExtensions.cs (1)
81optionsBuilder.Services.AddSingleton<IOptionsChangeTokenSource<TOptions>, ConfigurationChangeTokenSource<TOptions>>(sp =>
OptionsConfigurationServiceCollectionExtensions.cs (1)
73services.AddSingleton<IOptionsChangeTokenSource<TOptions>>(new ConfigurationChangeTokenSource<TOptions>(name, config));