3 interfaces inheriting from IConfiguration
Microsoft.Extensions.Configuration.Abstractions (3)
IConfigurationManager.cs (1)
13public interface IConfigurationManager : IConfiguration, IConfigurationBuilder
IConfigurationRoot.cs (1)
11public interface IConfigurationRoot : IConfiguration
IConfigurationSection.cs (1)
9public interface IConfigurationSection : IConfiguration
1 implementation of IConfiguration
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHostConfiguration.cs (1)
16public class WebAssemblyHostConfiguration : IConfiguration, IConfigurationRoot, IConfigurationBuilder
629 references to IConfiguration
Aspire.Azure.AI.OpenAI (4)
AspireAzureOpenAIExtensions.cs (2)
106protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<AzureOpenAIClient, AzureOpenAIClientOptions> clientBuilder, IConfiguration configuration) 113protected override void BindSettingsToConfiguration(AzureOpenAISettings settings, IConfiguration config)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Data.Tables (4)
AspireTablesExtensions.cs (2)
84protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<TableServiceClient, TableClientOptions> clientBuilder, IConfiguration configuration) 91protected override void BindSettingsToConfiguration(AzureDataTablesSettings settings, IConfiguration configuration)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Messaging.EventHubs (12)
EventHubBufferedProducerClientComponent.cs (2)
15IConfiguration configuration) 20protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<EventHubBufferedProducerClient, EventHubBufferedProducerClientOptions> clientBuilder, IConfiguration configuration)
EventHubConsumerClientComponent.cs (2)
15protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<EventHubConsumerClient, EventHubConsumerClientOptions> clientBuilder, IConfiguration configuration) 22protected override void BindSettingsToConfiguration(AzureMessagingEventHubsConsumerSettings settings, IConfiguration config)
EventHubProducerClientComponent.cs (2)
15protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<EventHubProducerClient, EventHubProducerClientOptions> clientBuilder, IConfiguration configuration) 22protected override void BindSettingsToConfiguration(AzureMessagingEventHubsProducerSettings settings, IConfiguration config)
EventProcessorClientComponent.cs (2)
22IConfiguration configuration) 30IConfiguration config)
PartitionReceiverClientComponent.cs (2)
17protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<PartitionReceiver, PartitionReceiverOptions> clientBuilder, IConfiguration configuration) 24protected override void BindSettingsToConfiguration(AzureMessagingEventHubsPartitionReceiverSettings settings, IConfiguration config)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Messaging.ServiceBus (4)
AspireServiceBusExtensions.cs (2)
98protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<ServiceBusClient, ServiceBusClientOptions> clientBuilder, IConfiguration configuration) 105protected override void BindSettingsToConfiguration(AzureMessagingServiceBusSettings settings, IConfiguration config)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Messaging.WebPubSub (4)
AspireWebPubSubExtensions.cs (2)
104protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<WebPubSubServiceClient, WebPubSubServiceClientOptions> clientBuilder, IConfiguration configuration) 111protected override void BindSettingsToConfiguration(AzureMessagingWebPubSubSettings settings, IConfiguration config)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Search.Documents (4)
AspireAzureSearchExtensions.cs (2)
91protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<SearchIndexClient, SearchClientOptions> clientBuilder, IConfiguration configuration) 98protected override void BindSettingsToConfiguration(AzureSearchSettings settings, IConfiguration config)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Security.KeyVault (5)
AspireKeyVaultExtensions.cs (3)
89this IConfiguration configuration, 138protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<SecretClient, SecretClientOptions> clientBuilder, IConfiguration configuration) 145protected override void BindSettingsToConfiguration(AzureSecurityKeyVaultSettings settings, IConfiguration configuration)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Storage.Blobs (4)
AspireBlobStorageExtensions.cs (2)
84protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<BlobServiceClient, BlobClientOptions> clientBuilder, IConfiguration configuration) 91protected override void BindSettingsToConfiguration(AzureStorageBlobsSettings settings, IConfiguration configuration)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Azure.Storage.Queues (4)
AspireQueueStorageExtensions.cs (2)
87protected override void BindClientOptionsToConfiguration(IAzureClientBuilder<QueueServiceClient, QueueClientOptions> clientBuilder, IConfiguration configuration) 94protected override void BindSettingsToConfiguration(AzureStorageQueuesSettings settings, IConfiguration configuration)
src\Components\Common\AzureComponent.cs (2)
34protected abstract void BindSettingsToConfiguration(TSettings settings, IConfiguration configuration); 36protected abstract void BindClientOptionsToConfiguration(IAzureClientBuilder<TClient, TClientOptions> clientBuilder, IConfiguration configuration);
Aspire.Confluent.Kafka.Tests (4)
ConsumerConfigurationTests.cs (2)
209var __ = provider.GetRequiredService<IConfiguration>();
ProducerConfigurationTests.cs (2)
199var __ = provider.GetRequiredService<IConfiguration>();
Aspire.Dashboard (16)
Configuration\PostConfigureDashboardOptions.cs (3)
12private readonly IConfiguration _configuration; 15public PostConfigureDashboardOptions(IConfiguration configuration) : this(configuration, NullLogger<PostConfigureDashboardOptions>.Instance) 19public PostConfigureDashboardOptions(IConfiguration configuration, ILogger<PostConfigureDashboardOptions> logger)
ResourceService\DashboardClient.cs (1)
73IConfiguration configuration,
src\Shared\IConfigurationExtensions.cs (12)
17/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 20public static bool? GetBool(this IConfiguration configuration, string key) 46/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 50public static bool GetBool(this IConfiguration configuration, string key, bool defaultValue) 58/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 64public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 88/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 94public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 134public static T? GetEnum<T>(this IConfiguration configuration, string key, T? defaultValue = default) 157/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 161public static T GetEnum<T>(this IConfiguration configuration, string key)
Aspire.Dashboard.Components.Tests (3)
Controls\ApplicationNameTests.cs (3)
11using IConfiguration = Microsoft.Extensions.Configuration.IConfiguration; 21Services.AddSingleton<IConfiguration>(new ConfigurationManager()); 39Services.AddSingleton<IConfiguration>(new ConfigurationManager());
Aspire.Dashboard.Tests (1)
Model\DashboardClientTests.cs (1)
21private readonly IConfiguration _configuration;
Aspire.Hosting (28)
Codespaces\CodespacesOptions.cs (1)
42internal class ConfigureCodespacesOptions(IConfiguration configuration) : IConfigureOptions<CodespacesOptions>
Dashboard\DashboardLifecycleHook.cs (1)
24internal sealed class DashboardLifecycleHook(IConfiguration configuration,
Dashboard\DashboardOptions.cs (1)
21internal class ConfigureDefaultDashboardOptions(IConfiguration configuration, IOptions<DcpOptions> dcpOptions) : IConfigureOptions<DashboardOptions>
Dashboard\DashboardServiceHost.cs (1)
52IConfiguration configuration,
Dashboard\TransportOptionsValidator.cs (1)
10internal class TransportOptionsValidator(IConfiguration configuration, DistributedApplicationExecutionContext executionContext, DistributedApplicationOptions distributedApplicationOptions) : IValidateOptions<TransportOptions>
Dcp\ApplicationExecutor.cs (1)
74IConfiguration configuration,
Dcp\DcpNameGenerator.cs (2)
19private readonly IConfiguration _configuration; 22public DcpNameGenerator(IConfiguration configuration, IOptions<DcpOptions> options)
Dcp\DcpOptions.cs (1)
102IConfiguration configuration) : IConfigureOptions<DcpOptions>
DistributedApplicationBuilder.cs (1)
373private static bool IsDashboardUnsecured(IConfiguration configuration)
DistributedApplicationLifecycle.cs (1)
13IConfiguration configuration,
IProjectMetadata.cs (1)
26internal IConfiguration? Configuration => null;
OtlpConfigurationExtensions.cs (1)
28public static void AddOtlpEnvironment(IResource resource, IConfiguration configuration, IHostEnvironment environment)
ParameterResourceBuilderExtensions.cs (1)
141private static string GetParameterValue(IConfiguration configuration, string name, ParameterDefault? parameterDefault, string? configurationKey = null)
ProjectResourceBuilderExtensions.cs (2)
345var config = GetConfiguration(projectResource); 623private static IConfiguration GetConfiguration(ProjectResource projectResource)
src\Shared\IConfigurationExtensions.cs (12)
17/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 20public static bool? GetBool(this IConfiguration configuration, string key) 46/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 50public static bool GetBool(this IConfiguration configuration, string key, bool defaultValue) 58/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 64public static Uri? GetUri(this IConfiguration configuration, string key, Uri? defaultValue = null) 88/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 94public static Uri[]? GetUris(this IConfiguration configuration, string key, Uri? defaultValue = null) 128/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 134public static T? GetEnum<T>(this IConfiguration configuration, string key, T? defaultValue = default) 157/// <param name="configuration">The <see cref="IConfiguration"/> this method extends.</param> 161public static T GetEnum<T>(this IConfiguration configuration, string key)
Aspire.Hosting.Azure (12)
Provisioning\Provisioners\AzureProvisioner.cs (3)
33IConfiguration configuration, 201IConfiguration configuration, 260private async Task ProcessResourceAsync(IConfiguration configuration, Lazy<Task<ProvisioningContext>> provisioningContextLazy, (IResource Resource, IAzureResource AzureResource) resource, CancellationToken cancellationToken)
Provisioning\Provisioners\AzureResourceProvisionerOfT.cs (6)
42Task<bool> ConfigureResourceAsync(IConfiguration configuration, IAzureResource resource, CancellationToken cancellationToken); 44bool ShouldProvision(IConfiguration configuration, IAzureResource resource); 55Task<bool> IAzureResourceProvisioner.ConfigureResourceAsync(IConfiguration configuration, IAzureResource resource, CancellationToken cancellationToken) => 58bool IAzureResourceProvisioner.ShouldProvision(IConfiguration configuration, IAzureResource resource) => 67public abstract Task<bool> ConfigureResourceAsync(IConfiguration configuration, TResource resource, CancellationToken cancellationToken); 69public virtual bool ShouldProvision(IConfiguration configuration, TResource resource) => true;
Provisioning\Provisioners\BicepProvisioner.cs (3)
26public override bool ShouldProvision(IConfiguration configuration, AzureBicepResource resource) 29public override async Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken) 436internal static async ValueTask<string?> GetCurrentChecksumAsync(AzureBicepResource resource, IConfiguration section, CancellationToken cancellationToken = default)
Aspire.Hosting.Dapr (2)
DaprDistributedApplicationLifecycleHook.cs (2)
20private readonly IConfiguration _configuration; 27public DaprDistributedApplicationLifecycleHook(IConfiguration configuration, IHostEnvironment environment, ILogger<DaprDistributedApplicationLifecycleHook> logger, IOptions<DaprOptions> options)
Aspire.Hosting.PostgreSQL (2)
PostgresBuilderExtensions.cs (2)
344var config = context.ExecutionContext.ServiceProvider.GetRequiredService<IConfiguration>();
Aspire.Hosting.Testing.Tests (4)
TestingBuilderTests.cs (2)
205var config = app.Services.GetRequiredService<IConfiguration>();
TestingFactoryTests.cs (2)
70var config = _app.Services.GetRequiredService<IConfiguration>();
Aspire.Hosting.Tests (9)
Dashboard\DashboardLifecycleHookTests.cs (1)
102IConfiguration configuration,
Dcp\ApplicationExecutorTests.cs (1)
1047IConfiguration? configuration = null,
DistributedApplicationBuilderTests.cs (6)
95var config = app.Services.GetRequiredService<IConfiguration>(); 105var config = app.Services.GetRequiredService<IConfiguration>(); 116var config = app.Services.GetRequiredService<IConfiguration>();
ProjectResourceTests.cs (1)
672public IConfiguration? Configuration => JsonConfigString == null ? null : new ConfigurationBuilder()
Aspire.Keycloak.Authentication (2)
AspireKeycloakExtensions.cs (2)
87.Configure<IConfiguration, IHttpClientFactory, IHostEnvironment>((options, configuration, httpClientFactory, hostEnvironment) => 166.Configure<IConfiguration, IHttpClientFactory, IHostEnvironment>((options, configuration, httpClientFactory, hostEnvironment) =>
Aspire.Microsoft.EntityFrameworkCore.Cosmos (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
17public static TSettings GetDbContextSettings<TContext, TSettings>(this IHostApplicationBuilder builder, string defaultConfigSectionName, Action<TSettings, IConfiguration> bindSettings)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
17public static TSettings GetDbContextSettings<TContext, TSettings>(this IHostApplicationBuilder builder, string defaultConfigSectionName, Action<TSettings, IConfiguration> bindSettings)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
17public static TSettings GetDbContextSettings<TContext, TSettings>(this IHostApplicationBuilder builder, string defaultConfigSectionName, Action<TSettings, IConfiguration> bindSettings)
Aspire.Oracle.EntityFrameworkCore (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
17public static TSettings GetDbContextSettings<TContext, TSettings>(this IHostApplicationBuilder builder, string defaultConfigSectionName, Action<TSettings, IConfiguration> bindSettings)
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
src\Components\Common\EntityFrameworkUtils.cs (1)
17public static TSettings GetDbContextSettings<TContext, TSettings>(this IHostApplicationBuilder builder, string defaultConfigSectionName, Action<TSettings, IConfiguration> bindSettings)
Aspire.StackExchange.Redis (1)
AspireRedisExtensions.cs (1)
170private static ConfigurationOptions BindToConfiguration(ConfigurationOptions options, IConfiguration configuration)
BasketService (2)
BasketService.cs (2)
9public class BasketService(IBasketRepository repository, IConfiguration configuration, IServiceProvider serviceProvider, ILogger<BasketService> logger) : Basket.BasketBase 12private readonly IConfiguration _configuration = configuration;
blazor-devserver (4)
Server\Startup.cs (4)
14public Startup(IConfiguration configuration) 19public IConfiguration Configuration { get; } 26public static void Configure(IApplicationBuilder app, IConfiguration configuration) 82private static void EnableConfiguredPathbase(IApplicationBuilder app, IConfiguration configuration)
BlazorServerApp (2)
Startup.cs (2)
10public Startup(IConfiguration configuration) 15public IConfiguration Configuration { get; }
ClaimsTransformation (2)
Startup.cs (2)
21public Startup(IConfiguration configuration) 26public IConfiguration Configuration { get; }
Cookies (2)
Startup.cs (2)
23public Startup(IConfiguration configuration) 28public IConfiguration Configuration { get; }
CustomAuthorizationFailureResponse (2)
Startup.cs (2)
21public Startup(IConfiguration configuration) 26public IConfiguration Configuration { get; }
DefaultBuilder.SampleApp (2)
Startup.cs (2)
15public void Configure(IApplicationBuilder app, IConfiguration config) 52private static async Task ShowConfig(HttpResponse response, IConfiguration config)
DynamicSchemes (2)
Startup.cs (2)
18public Startup(IConfiguration configuration) 23public IConfiguration Configuration { get; }
HealthChecksSample (6)
DbContextHealthStartup.cs (2)
11public DbContextHealthStartup(IConfiguration configuration) 16public IConfiguration Configuration { get; }
DBHealthStartup.cs (2)
9public DbHealthStartup(IConfiguration configuration) 14public IConfiguration Configuration { get; }
ManagementPortStartup.cs (2)
9public ManagementPortStartup(IConfiguration configuration) 14public IConfiguration Configuration { get; }
HostedBlazorWebassemblyApp.Server (2)
Startup.cs (2)
19public Startup(IConfiguration configuration) 24public IConfiguration Configuration { get; }
HostFilteringSample (2)
Startup.cs (2)
11public IConfiguration Config { get; } 13public Startup(IConfiguration config)
Identity.DefaultUI.WebSite (8)
ApplicationUserStartup.cs (1)
10public ApplicationUserStartup(IConfiguration configuration) : base(configuration)
NoIdentityStartup.cs (2)
11public NoIdentityStartup(IConfiguration configuration) 16public IConfiguration Configuration { get; }
PocoUserStartup.cs (1)
12public PocoUserStartup(IConfiguration configuration) : base(configuration)
Startup.cs (1)
11public Startup(IConfiguration configuration) : base(configuration)
StartupBase.cs (2)
17public StartupBase(IConfiguration configuration) 22public IConfiguration Configuration { get; }
StartupWithoutEndpointRouting.cs (1)
11public StartupWithoutEndpointRouting(IConfiguration configuration) : base(configuration)
Identity.ExternalClaims (2)
Startup.cs (2)
26public Startup(IConfiguration configuration) 31public IConfiguration Configuration { get; }
InProcessWebSite (4)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (4)
73var config = ctx.RequestServices.GetService<IConfiguration>(); 1133var httpsPort = context.RequestServices.GetService<IConfiguration>().GetValue<int?>("ANCM_HTTPS_PORT"); 1140var httpsPort = context.RequestServices.GetService<IConfiguration>().GetValue<int?>("HTTPS_PORT");
JwtBearerSample (2)
Startup.cs (2)
14public Startup(IConfiguration config) 19public IConfiguration Configuration { get; set; }
Kestrel.SampleApp (1)
Startup.cs (1)
187private static void ShowConfig(IConfiguration config)
Microsoft.AspNetCore (19)
ForwardedHeadersOptionsSetup.cs (2)
13private readonly IConfiguration _configuration; 15public ForwardedHeadersOptionsSetup(IConfiguration configuration)
ForwardedHeadersStartupFilter.cs (2)
12private readonly IConfiguration _configuration; 14public ForwardedHeadersStartupFilter(IConfiguration configuration)
WebApplication.cs (4)
47/// The application's configured <see cref="IConfiguration"/>. 49public IConfiguration Configuration => _host.Services.GetRequiredService<IConfiguration>(); 266public IConfiguration Configuration => _webApplication.Configuration;
WebHost.cs (11)
124/// load <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json', 125/// load <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly, 126/// load <see cref="IConfiguration"/> from environment variables, 143/// load <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json', 144/// load <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly, 145/// load <see cref="IConfiguration"/> from environment variables, 146/// load <see cref="IConfiguration"/> from supplied command line args, 293/// load <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json', 294/// load <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly, 295/// load <see cref="IConfiguration"/> from environment variables, 296/// load <see cref="IConfiguration"/> from supplied command line args,
Microsoft.AspNetCore.Authentication (6)
AuthenticationConfigurationProviderExtensions.cs (3)
16/// Returns the specified <see cref="IConfiguration"/> object. 20/// <returns>The specified <see cref="IConfiguration"/> object, or null if the requested section does not exist.</returns> 21public static IConfiguration GetSchemeConfiguration(this IAuthenticationConfigurationProvider provider, string authenticationScheme)
DefaultAuthenticationConfigurationProvider.cs (3)
10private readonly IConfiguration _configuration; 17public DefaultAuthenticationConfigurationProvider(IConfiguration configuration) 20public IConfiguration AuthenticationConfiguration => _configuration.GetSection(AuthenticationKey);
Microsoft.AspNetCore.Authentication.Abstractions (1)
IAuthenticationConfigurationProvider.cs (1)
18IConfiguration AuthenticationConfiguration { get; }
Microsoft.AspNetCore.Authentication.JwtBearer (2)
JwtBearerConfigureOptions.cs (2)
36var configSection = _authenticationConfigurationProvider.GetSchemeConfiguration(name); 79private static IEnumerable<SecurityKey> GetIssuerSigningKeys(IConfiguration configuration, List<string?> issuers)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
OpenIdConnectConfigureOptions.cs (2)
36var configSection = _authenticationConfigurationProvider.GetSchemeConfiguration(name); 85private static void SetCookieFromConfig(IConfiguration cookieConfigSection, CookieBuilder cookieBuilder)
Microsoft.AspNetCore.Authentication.Test (14)
AuthenticationMiddlewareTests.cs (1)
213serviceCollection.AddSingleton<IConfiguration>(new ConfigurationManager());
JwtBearerTests_Handler.cs (5)
969services.AddSingleton<IConfiguration>(config); 1001services.AddSingleton<IConfiguration>(config); 1033services.AddSingleton<IConfiguration>(config); 1053services.AddSingleton<IConfiguration>(config); 1075services.AddSingleton<IConfiguration>(config);
OpenIdConnect\OpenIdConnectTests.cs (5)
435services.AddSingleton<IConfiguration>(config); 468services.AddSingleton<IConfiguration>(config); 503services.AddSingleton<IConfiguration>(config); 526services.AddSingleton<IConfiguration>(config); 551services.AddSingleton<IConfiguration>(config);
RemoteAuthenticationTests.cs (1)
22s.AddSingleton<IConfiguration>(new ConfigurationManager());
WsFederation\WsFederationTest.cs (1)
30services.AddSingleton<IConfiguration>(new ConfigurationManager());
WsFederation\WsFederationTest_Handler.cs (1)
28services.AddSingleton<IConfiguration>(new ConfigurationManager());
Microsoft.AspNetCore.AzureAppServices.HostingStartup (4)
AzureAppServicesHostingStartup.cs (1)
24var baseConfiguration = HostingStartupConfigurationExtensions.GetBaseConfiguration();
HostingStartupConfigurationExtensions.cs (3)
11public static IConfiguration GetBaseConfiguration() 17public static bool IsEnabled(this IConfiguration configuration, string hostingStartupName, string featureName) 28public static bool TryGetOption(this IConfiguration configuration, string hostingStartupName, string featureName, [NotNullWhen(true)] out string? value)
Microsoft.AspNetCore.BrowserTesting (6)
BrowserManagerConfiguration.cs (5)
11public BrowserManagerConfiguration(IConfiguration configuration) 71private void Load(IConfiguration configuration) 125private BrowserNewContextOptions LoadContextOptions(IConfiguration configuration) => EnsureFoldersExist(new BrowserNewContextOptions 158private static T BindValue<T>(IConfiguration configuration, string key) where T : new() 196private static BrowserTypeLaunchOptions LoadBrowserLaunchOptions(IConfiguration configuration) => new BrowserTypeLaunchOptions
BrowserTestBase.cs (1)
37private static IConfiguration CreateConfiguration()
Microsoft.AspNetCore.Components.Endpoints (2)
DependencyInjection\DefaultRazorComponentsServiceOptionsConfiguration.cs (2)
15IConfiguration configuration, 20public IConfiguration Configuration { get; } = configuration;
Microsoft.AspNetCore.Components.Endpoints.Tests (4)
Builder\RazorComponentsEndpointConventionBuilderExtensionsTest.cs (1)
274collection.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
RazorComponentEndpointInvokerTest.cs (1)
23.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
RazorComponentsServiceCollectionExtensionsTest.cs (2)
20services.AddSingleton<IConfiguration>(new ConfigurationBuilder().AddInMemoryCollection().Build()); 47services.AddSingleton<IConfiguration>(new ConfigurationBuilder().AddInMemoryCollection().Build());
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitOptionsJSInteropDetailedErrorsConfiguration.cs (2)
12public CircuitOptionsJSInteropDetailedErrorsConfiguration(IConfiguration configuration) 17public IConfiguration Configuration { get; }
Microsoft.AspNetCore.Components.Server.Tests (1)
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
141services.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
Microsoft.AspNetCore.Components.WebAssembly (5)
Hosting\WebAssemblyHost.cs (2)
27private readonly IConfiguration _configuration; 63public IConfiguration Configuration => _configuration;
Hosting\WebAssemblyHostBuilder.cs (1)
286Services.AddSingleton<IConfiguration>(Configuration);
Hosting\WebAssemblyHostConfiguration.cs (2)
92IEnumerable<IConfigurationSection> IConfiguration.GetChildren() 168/// Builds an <see cref="IConfiguration"/> with keys and values from the set of providers registered in
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Hosting\WebAssemblyHostBuilderTest.cs (2)
202var configuration = host.Services.GetRequiredService<IConfiguration>();
Hosting\WebAssemblyHostConfigurationTest.cs (1)
71IConfiguration readableConfig = configuration;
Microsoft.AspNetCore.DataProtection (1)
Internal\KeyManagementOptionsPostSetup.cs (1)
41public KeyManagementOptionsPostSetup(IConfiguration configuration, ILoggerFactory loggerFactory)
Microsoft.AspNetCore.DataProtection.Tests (2)
ServiceCollectionTests.cs (2)
82.AddSingleton<IConfiguration>(config) 115.AddSingleton<IConfiguration>(config)
Microsoft.AspNetCore.Hosting (20)
GenericHost\GenericWebHostBuilder.cs (1)
383if (serviceType == typeof(IConfiguration))
GenericHost\GenericWebHostService.cs (2)
28IConfiguration configuration, 58public IConfiguration Configuration { get; }
GenericHost\WebHostBuilderBase.cs (1)
13private protected readonly IConfiguration _config;
Internal\WebHost.cs (2)
33private readonly IConfiguration _config; 52IConfiguration config,
Internal\WebHostOptions.cs (2)
14public WebHostOptions(IConfiguration primaryConfiguration, IConfiguration? fallbackConfiguration = null, IHostEnvironment? environment = null)
StaticWebAssets\StaticWebAssetsLoader.cs (3)
23/// <param name="configuration">The host <see cref="IConfiguration"/>.</param> 24public static void UseStaticWebAssets(IWebHostEnvironment environment, IConfiguration configuration) 46internal static Stream? ResolveManifest(IWebHostEnvironment environment, IConfiguration configuration)
WebHostBuilder.cs (6)
26private readonly IConfiguration _config; 112/// Adds a delegate for configuring the <see cref="IConfigurationBuilder"/> that will construct an <see cref="IConfiguration"/>. 114/// <param name="configureDelegate">The delegate for configuring the <see cref="IConfigurationBuilder" /> that will be used to construct an <see cref="IConfiguration" />.</param> 117/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage. 174_ = host.Services.GetService<IConfiguration>(); 283services.AddSingleton<IConfiguration>(_ => configuration);
WebHostBuilderExtensions.cs (3)
210/// Adds a delegate for configuring the <see cref="IConfigurationBuilder"/> that will construct an <see cref="IConfiguration"/>. 213/// <param name="configureDelegate">The delegate for configuring the <see cref="IConfigurationBuilder" /> that will be used to construct an <see cref="IConfiguration" />.</param> 216/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
Microsoft.AspNetCore.Hosting.Abstractions (7)
HostingAbstractionsWebHostBuilderExtensions.cs (2)
22/// <param name="configuration">The <see cref="IConfiguration"/> containing settings to be used.</param> 24public static IWebHostBuilder UseConfiguration(this IWebHostBuilder hostBuilder, IConfiguration configuration)
IWebHostBuilder.cs (3)
21/// Adds a delegate for configuring the <see cref="IConfigurationBuilder"/> that will construct an <see cref="IConfiguration"/>. 23/// <param name="configureDelegate">The delegate for configuring the <see cref="IConfigurationBuilder" /> that will be used to construct an <see cref="IConfiguration" />.</param> 26/// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="WebHostBuilderContext"/> are uninitialized at this stage.
WebHostBuilderContext.cs (2)
19/// The <see cref="IConfiguration" /> containing the merged configuration of the application and the <see cref="IWebHost" />. 21public IConfiguration Configuration { get; set; } = default!;
Microsoft.AspNetCore.Hosting.Tests (24)
GenericWebHostBuilderTests.cs (4)
25var config = host.Services.GetRequiredService<IConfiguration>(); 38var config = host.Services.GetRequiredService<IConfiguration>();
HostingEnvironmentExtensionsTests.cs (2)
76private WebHostOptions CreateWebHostOptions(IConfiguration configuration = null) 79configuration ?? Mock.Of<IConfiguration>());
WebHostBuilderTests.cs (17)
33var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>()); 369Assert.NotNull(host.Services.GetService<IConfiguration>()); 410var config = host.Services.GetService<IConfiguration>(); 498var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>()); 524var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>()); 550var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>()); 585var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>()); 1092var configuration = host.Services.GetRequiredService<IConfiguration>(); 1128var configuration = host.Services.GetRequiredService<IConfiguration>(); 1135public StartupCheckConfig(IConfiguration config) 1281var options = CreateWebHostOptions(host.Services.GetRequiredService<IConfiguration>()); 1337var appConfig = host.Services.GetRequiredService<IConfiguration>(); 1413private WebHostOptions CreateWebHostOptions(IConfiguration configuration)
WebHostTests.cs (1)
1104private IWebHostBuilder CreateBuilder(IConfiguration config = null)
Microsoft.AspNetCore.HttpsPolicy (3)
HttpsRedirectionMiddleware.cs (3)
26private readonly IConfiguration _config; 36public HttpsRedirectionMiddleware(RequestDelegate next, IOptions<HttpsRedirectionOptions> options, IConfiguration config, ILoggerFactory loggerFactory) 66public HttpsRedirectionMiddleware(RequestDelegate next, IOptions<HttpsRedirectionOptions> options, IConfiguration config, ILoggerFactory loggerFactory,
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (9)
CustomSchemaTest.cs (1)
22.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
DefaultPocoTest.cs (1)
23.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
EmptySchemaTest.cs (1)
22.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
MaxKeyLengthSchemaTest.cs (1)
23.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
UserOnlyCustomContextTest.cs (1)
67.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
UserOnlyTest.cs (1)
28.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
Utilities\TestEnvironment.cs (1)
10public static IConfiguration Config { get; }
VersionOneSchemaTest.cs (1)
22.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
VersionTwoSchemaTest.cs (1)
22.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
Microsoft.AspNetCore.Identity.InMemory.Test (2)
ControllerTest.cs (2)
32.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()) 84.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build())
Microsoft.AspNetCore.Identity.Test (21)
IdentityBuilderTest.cs (16)
57.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 67.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 78.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 93.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 108.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 118.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 128.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 138.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 150.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 162.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()) 179.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 203.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 222.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 242.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 254.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build()); 265.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
UserManagerTest.cs (5)
19.AddSingleton<IConfiguration>(config) 34.AddSingleton<IConfiguration>(config) 793.AddSingleton<IConfiguration>(config) 890.AddSingleton<IConfiguration>(config) 1746.AddSingleton<IConfiguration>(config)
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
TestingInfrastructureInheritanceTests.cs (1)
63Assert.NotNull(factory.Services.GetService(typeof(IConfiguration)));
TestingInfrastructureTests.cs (4)
200Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 209Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 218Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 227Assert.NotNull(factory.Services.GetService(typeof(IConfiguration)));
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
216collection.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
Microsoft.AspNetCore.Mvc.Test (5)
MvcServiceCollectionExtensionsTest.cs (5)
166services.AddSingleton<IConfiguration>(new ConfigurationBuilder().AddInMemoryCollection().Build()); 183services.AddSingleton<IConfiguration>(new ConfigurationBuilder().AddInMemoryCollection().Build()); 202services.AddSingleton<IConfiguration>(new ConfigurationBuilder().AddInMemoryCollection().Build()); 219services.AddSingleton<IConfiguration>(new ConfigurationBuilder().AddInMemoryCollection().Build()); 405services.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
289collection.AddSingleton<IConfiguration>(new ConfigurationBuilder().Build());
Microsoft.AspNetCore.Routing.FunctionalTests (4)
Benchmarks\EndpointRoutingBenchmarkTest.cs (2)
28var configuration = _host.Services.GetService<IConfiguration>();
Benchmarks\RouterBenchmarkTest.cs (2)
29var configuration = _host.Services.GetService<IConfiguration>();
Microsoft.AspNetCore.Server.IIS (3)
Core\IISEnvironmentFeature.cs (2)
11public static bool TryCreate(IConfiguration configuration, [NotNullWhen(true)] out IIISEnvironmentFeature? result) 25private IISEnvironmentFeature(IConfiguration configuration)
Core\IISHttpServer.cs (1)
62IConfiguration configuration,
Microsoft.AspNetCore.Server.IISIntegration.Tests (4)
IISMiddlewareTests.cs (4)
320var configuration = host.Services.GetService<IConfiguration>(); 349var configuration = host.Services.GetService<IConfiguration>();
Microsoft.AspNetCore.Server.Kestrel.Core (10)
Internal\ConfigurationReader.cs (2)
24private readonly IConfiguration _configuration; 30public ConfigurationReader(IConfiguration configuration)
KestrelConfigurationLoader.cs (3)
36IConfiguration configuration, 59/// Gets the application <see cref="IConfiguration"/>. 61public IConfiguration Configuration { get; internal set; } // Setter internal for testing
KestrelServerOptions.cs (5)
433/// Creates a configuration loader for setting up Kestrel that takes an <see cref="IConfiguration"/> as input. 435/// Call <see cref="Configure(IConfiguration, bool)"/> to enable dynamic endpoint binding updates. 439public KestrelConfigurationLoader Configure(IConfiguration config) => Configure(config, reloadOnChange: false); 442/// Creates a configuration loader for setting up Kestrel that takes an <see cref="IConfiguration"/> as input. 451public KestrelConfigurationLoader Configure(IConfiguration config, bool reloadOnChange)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
KestrelServerTests.cs (2)
780var mockConfig = new Mock<IConfiguration>(); 920var mockConfig = new Mock<IConfiguration>();
Microsoft.AspNetCore.Server.Kestrel.Tests (3)
KestrelConfigurationLoaderTests.cs (3)
37private static Mock<IConfiguration> CreateMockConfiguration() => CreateMockConfiguration(out _); 39private static Mock<IConfiguration> CreateMockConfiguration(out Mock<IChangeToken> mockReloadToken) 49var mockConfig = new Mock<IConfiguration>();
Microsoft.AspNetCore.StaticAssets (5)
Development\StaticAssetDevelopmentRuntimeHandler.cs (5)
160var config = serviceProvider.GetRequiredService<IConfiguration>(); 171var config = endpoints.ServiceProvider.GetRequiredService<IConfiguration>(); 244private static bool IsEnabled(IConfiguration config, string key)
Microsoft.AspNetCore.Tests (11)
WebApplicationTests.cs (9)
1362var config = app.Services.GetRequiredService<IConfiguration>(); 1388var config = sp.GetService<IConfiguration>(); 1402builder.Services.AddSingleton<IConfiguration>(builder.Configuration); 1405var config = sp.GetService<IConfiguration>(); 1533var config = serviceProvider.GetService<IConfiguration>();
WebHostTests.cs (2)
38var config = host.Services.GetRequiredService<IConfiguration>();
Microsoft.Extensions.Configuration (15)
ChainedBuilderExtensions.cs (5)
10/// Provides extension methods for adding <see cref="IConfiguration"/> to an <see cref="IConfigurationBuilder"/>. 18/// <param name="config">The <see cref="IConfiguration"/> to add.</param> 20public static IConfigurationBuilder AddConfiguration(this IConfigurationBuilder configurationBuilder, IConfiguration config) 27/// <param name="config">The <see cref="IConfiguration"/> to add.</param> 30public static IConfigurationBuilder AddConfiguration(this IConfigurationBuilder configurationBuilder, IConfiguration config, bool shouldDisposeConfiguration)
ChainedConfigurationProvider.cs (3)
15private readonly IConfiguration _config; 33public IConfiguration Configuration => _config; 77IConfiguration section = parentPath == null ? _config : _config.GetSection(parentPath);
ChainedConfigurationSource.cs (2)
9/// Represents a chained <see cref="IConfiguration"/> as an <see cref="IConfigurationSource"/>. 17public IConfiguration? Configuration { get; set; }
ConfigurationBuilder.cs (1)
41/// Builds an <see cref="IConfiguration"/> with keys and values from the set of providers registered in
ConfigurationManager.cs (1)
100IChangeToken IConfiguration.GetReloadToken() => _changeToken;
ConfigurationSectionDebugView.cs (3)
43internal static List<ConfigurationSectionDebugView> FromConfiguration(IConfiguration current, IConfigurationRoot root) 47var stack = new Stack<IConfiguration>(); 52IConfiguration config = stack.Pop();
Microsoft.Extensions.Configuration.Abstractions (12)
ConfigurationExtensions.cs (8)
36public static string? GetConnectionString(this IConfiguration configuration, string name) 42/// Get the enumeration of key value pairs within the <see cref="IConfiguration" /> 46public static IEnumerable<KeyValuePair<string, string?>> AsEnumerable(this IConfiguration configuration) => configuration.AsEnumerable(makePathsRelative: false); 49/// Get the enumeration of key value pairs within the <see cref="IConfiguration" /> 54public static IEnumerable<KeyValuePair<string, string?>> AsEnumerable(this IConfiguration configuration, bool makePathsRelative) 56var stack = new Stack<IConfiguration>(); 61IConfiguration config = stack.Pop(); 98public static IConfigurationSection GetRequiredSection(this IConfiguration configuration, string key)
IConfigurationBuilder.cs (1)
32/// Builds an <see cref="IConfiguration"/> with keys and values from the set of sources registered in
IConfigurationManager.cs (1)
10/// It is both an <see cref="IConfigurationBuilder"/> and an <see cref="IConfiguration"/>.
IConfigurationRoot.cs (1)
9/// Represents the root of an <see cref="IConfiguration"/> hierarchy.
IConfigurationSection.cs (1)
17/// Gets the full path to this section within the <see cref="IConfiguration"/>.
Microsoft.Extensions.Configuration.Binder (21)
ConfigurationBinder.cs (21)
37public static T? Get<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(this IConfiguration configuration) 51public static T? Get<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(this IConfiguration configuration, Action<BinderOptions>? configureOptions) 73public static object? Get(this IConfiguration configuration, Type type) 88this IConfiguration configuration, 111public static void Bind(this IConfiguration configuration, string key, object? instance) 124public static void Bind(this IConfiguration configuration, object? instance) 135public static void Bind(this IConfiguration configuration, object? instance, Action<BinderOptions>? configureOptions) 156public static T? GetValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(this IConfiguration configuration, string key) 171public static T? GetValue<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] T>(this IConfiguration configuration, string key, T defaultValue) 185this IConfiguration configuration, 204this IConfiguration configuration, 223private static void BindProperties(object instance, IConfiguration configuration, BinderOptions options, ParameterInfo[]? constructorParameters) 290private static void BindProperty(PropertyInfo property, object instance, IConfiguration config, BinderOptions options) 325IConfiguration config, 497IConfiguration config, 614IConfiguration config, BinderOptions options) 685IConfiguration config, BinderOptions options) 755IConfiguration config, BinderOptions options) 791private static Array BindArray(Type type, IEnumerable? source, IConfiguration config, BinderOptions options) 850private static object? BindSet(Type type, IEnumerable? source, IConfiguration config, BinderOptions options) 1067private static object? BindParameter(ParameterInfo parameter, Type type, IConfiguration config,
Microsoft.Extensions.Diagnostics (10)
Metrics\Configuration\IMetricListenerConfigurationFactory.cs (1)
18IConfiguration GetConfiguration(string listenerName);
Metrics\Configuration\MetricListenerConfigurationFactory.cs (1)
19public IConfiguration GetConfiguration(string listenerName)
Metrics\Configuration\MetricsBuilderConfigurationExtensions.cs (4)
14/// Extensions for <see cref="IMetricsBuilder"/> for enabling metrics based on <see cref="IConfiguration"/>. 19/// Reads metrics configuration from the provided <see cref="IConfiguration"/> section and configures 23/// <param name="configuration">The <see cref="IConfiguration"/> section to load.</param> 25public static IMetricsBuilder AddConfiguration(this IMetricsBuilder builder, IConfiguration configuration)
Metrics\Configuration\MetricsConfiguration.cs (2)
11public MetricsConfiguration(IConfiguration configuration) 16public IConfiguration Configuration { get; }
Metrics\Configuration\MetricsConfigureOptions.cs (2)
17private readonly IConfiguration _configuration; 19public MetricsConfigureOptions(IConfiguration configuration)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
TelemetryHealthChecksPublisherExtensionsTests.cs (1)
69private static IConfiguration SetupTelemetryHealthCheckPublisherConfiguration(string logOnlyUnhealthy)
Microsoft.Extensions.Hosting (56)
Host.cs (20)
22/// <item><description>load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables</description></item> 23/// <item><description>load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json'</description></item> 24/// <item><description>load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly</description></item> 25/// <item><description>load app <see cref="IConfiguration"/> from environment variables</description></item> 41/// <item><description>load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables</description></item> 42/// <item><description>load host <see cref="IConfiguration"/> from supplied command line args</description></item> 43/// <item><description>load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json'</description></item> 44/// <item><description>load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly</description></item> 45/// <item><description>load app <see cref="IConfiguration"/> from environment variables</description></item> 46/// <item><description>load app <see cref="IConfiguration"/> from supplied command line args</description></item> 66/// <item><description>load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables</description></item> 67/// <item><description>load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json'</description></item> 68/// <item><description>load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly</description></item> 69/// <item><description>load app <see cref="IConfiguration"/> from environment variables</description></item> 84/// <item><description>load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables</description></item> 85/// <item><description>load host <see cref="IConfiguration"/> from supplied command line args</description></item> 86/// <item><description>load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json'</description></item> 87/// <item><description>load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly</description></item> 88/// <item><description>load app <see cref="IConfiguration"/> from environment variables</description></item> 89/// <item><description>load app <see cref="IConfiguration"/> from supplied command line args</description></item>
HostApplicationBuilder.cs (12)
42/// <item><description>load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables</description></item> 43/// <item><description>load host <see cref="IConfiguration"/> from supplied command line args</description></item> 44/// <item><description>load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json'</description></item> 45/// <item><description>load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly</description></item> 46/// <item><description>load app <see cref="IConfiguration"/> from environment variables</description></item> 47/// <item><description>load app <see cref="IConfiguration"/> from supplied command line args</description></item> 64/// <item><description>load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables</description></item> 65/// <item><description>load host <see cref="IConfiguration"/> from supplied command line args</description></item> 66/// <item><description>load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json'</description></item> 67/// <item><description>load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly</description></item> 68/// <item><description>load app <see cref="IConfiguration"/> from environment variables</description></item> 69/// <item><description>load app <see cref="IConfiguration"/> from supplied command line args</description></item>
HostApplicationBuilderSettings.cs (5)
32/// * load <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables 33/// * load <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json' 34/// * load <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly 35/// * load <see cref="IConfiguration"/> from environment variables 36/// * load <see cref="IConfiguration"/> from supplied command line args
HostBuilder.cs (9)
34private IConfiguration? _hostConfiguration; 35private IConfiguration? _appConfiguration; 61/// to construct the <see cref="IConfiguration"/> for the host.</param> 77/// to construct the <see cref="IConfiguration"/> for the host.</param> 91/// to construct the <see cref="IConfiguration"/> for the host.</param> 137/// to construct the <see cref="IConfiguration"/> for the host.</param> 227internal static (HostingEnvironment, PhysicalFileProvider) CreateHostingEnvironment(IConfiguration hostConfiguration) 297IConfiguration appConfiguration, 375_ = serviceProvider.GetService<IConfiguration>();
HostingHostBuilderExtensions.cs (7)
144/// to construct the <see cref="IConfiguration"/> for the host.</param> 182/// * load host <see cref="IConfiguration"/> from "DOTNET_" prefixed environment variables 183/// * load host <see cref="IConfiguration"/> from supplied command line args 184/// * load app <see cref="IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="IHostEnvironment.EnvironmentName"/>].json' 185/// * load app <see cref="IConfiguration"/> from User Secrets when <see cref="IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly 186/// * load app <see cref="IConfiguration"/> from environment variables 187/// * load app <see cref="IConfiguration"/> from supplied command line args
HostOptions.cs (1)
62internal void Initialize(IConfiguration configuration)
Internal\Host.cs (2)
450public IConfiguration Configuration => host.Services.GetRequiredService<IConfiguration>();
Microsoft.Extensions.Hosting.Abstractions (4)
HostBuilderContext.cs (2)
32/// The <see cref="IConfiguration" /> containing the merged configuration of the application and the <see cref="IHost" />. 34public IConfiguration Configuration { get; set; } = null!;
IHostBuilder.cs (2)
26/// to construct the <see cref="IConfiguration"/> for the host.</param> 36/// to construct the <see cref="IConfiguration"/> for the application.</param>
Microsoft.Extensions.Http (4)
DependencyInjection\SocketsHttpHandlerBuilderExtensions.cs (4)
47/// Uses <see cref="IConfiguration"/> to configure the primary <see cref="SocketsHttpHandler"/> for a 58/// All unmatched properties in <see cref="IConfiguration"/> will be ignored. 62public static ISocketsHttpHandlerBuilder Configure(this ISocketsHttpHandlerBuilder builder, IConfiguration configuration) 191private static SocketsHttpHandlerConfiguration ParseSocketsHttpHandlerConfiguration(IConfiguration config)
Microsoft.Extensions.Http.Resilience.Tests (4)
Helpers\ConfigurationStubFactory.cs (3)
12public static IConfiguration Create(Dictionary<string, string?> collection) => Create(collection, out _); 14public static IConfiguration Create(Dictionary<string, string?> collection, out Action<Dictionary<string, string?>> reload) 26public static IConfiguration CreateEmpty()
Routing\RoutingStrategyTest.cs (1)
112Action<IRoutingStrategyBuilder, IConfiguration> configure,
Microsoft.Extensions.Logging.AzureAppServices (11)
AzureAppServicesLoggerFactoryExtensions.cs (3)
56var config = SiteConfigurationProvider.GetAzureLoggingConfiguration(context); 97private static ConfigurationBasedLevelSwitcher CreateBlobFilterConfigureOptions(IConfiguration config) 105private static ConfigurationBasedLevelSwitcher CreateFileFilterConfigureOptions(IConfiguration config)
BatchLoggerConfigureOptions.cs (2)
11private readonly IConfiguration _configuration; 14public BatchLoggerConfigureOptions(IConfiguration configuration, string isEnabledKey)
BlobLoggerConfigureOptions.cs (2)
12private readonly IConfiguration _configuration; 16public BlobLoggerConfigureOptions(IConfiguration configuration, IWebAppContext context, Action<AzureBlobLoggerOptions> configureOptions)
ConfigurationBasedLevelSwitcher.cs (2)
12private readonly IConfiguration _configuration; 16public ConfigurationBasedLevelSwitcher(IConfiguration configuration, Type provider, string levelKey)
FileLoggerConfigureOptions.cs (1)
14public FileLoggerConfigureOptions(IConfiguration configuration, IWebAppContext context)
SiteConfigurationProvider.cs (1)
11public static IConfiguration GetAzureLoggingConfiguration(IWebAppContext context)
Microsoft.Extensions.Logging.Configuration (12)
ILoggerProviderConfiguration.cs (1)
17IConfiguration Configuration { get; }
ILoggerProviderConfigurationFactory.cs (2)
18/// <returns>The <see cref="IConfiguration"/> for the given <paramref name="providerType" />.</returns> 19IConfiguration GetConfiguration(Type providerType);
LoggerFilterConfigureOptions.cs (2)
14private readonly IConfiguration _configuration; 16public LoggerFilterConfigureOptions(IConfiguration configuration)
LoggerProviderConfiguration.cs (1)
15public IConfiguration Configuration { get; }
LoggerProviderConfigurationFactory.cs (1)
19public IConfiguration GetConfiguration(Type providerType)
LoggingBuilderExtensions.cs (3)
17/// Configures <see cref="LoggerFilterOptions" /> from an instance of <see cref="IConfiguration" />. 20/// <param name="configuration">The <see cref="IConfiguration" /> to add.</param> 22public static ILoggingBuilder AddConfiguration(this ILoggingBuilder builder, IConfiguration configuration)
LoggingConfiguration.cs (2)
10public IConfiguration Configuration { get; } 12public LoggingConfiguration(IConfiguration configuration)
Microsoft.Extensions.Logging.Console (9)
ConfigurationConsoleLoggerSettings.cs (2)
18internal readonly IConfiguration _configuration; 24public ConfigurationConsoleLoggerSettings(IConfiguration configuration)
ConsoleFormatterConfigureOptions.cs (1)
21private readonly IConfiguration _configuration;
ConsoleFormatterOptions.cs (1)
44internal virtual void Configure(IConfiguration configuration) => configuration.Bind(this);
ConsoleLoggerConfigureOptions.cs (1)
21private readonly IConfiguration _configuration;
ConsoleLoggerExtensions.cs (1)
171internal static IConfiguration GetFormatterOptionsSection(this ILoggerProviderConfiguration<ConsoleLoggerProvider> providerConfiguration)
ConsoleLoggerExtensions.Obsolete.cs (1)
24public static Logging.ILoggerFactory AddConsole(this Logging.ILoggerFactory factory, Extensions.Configuration.IConfiguration configuration)
JsonConsoleFormatterOptions.cs (1)
26internal override void Configure(IConfiguration configuration) => configuration.Bind(this);
SimpleConsoleFormatterOptions.cs (1)
31internal override void Configure(IConfiguration configuration) => configuration.Bind(this);
Microsoft.Extensions.Options.ConfigurationExtensions (31)
ConfigurationChangeTokenSource.cs (7)
12/// notified when <see cref="IConfiguration"/> changes. 17private readonly IConfiguration _config; 20/// Constructor taking the <see cref="IConfiguration"/> instance to watch. 23public ConfigurationChangeTokenSource(IConfiguration config) : this(Options.DefaultName, config) 28/// Constructor taking the <see cref="IConfiguration"/> instance to watch. 32public ConfigurationChangeTokenSource(string? name, IConfiguration config) 46/// Returns the reloadToken from the <see cref="IConfiguration"/>.
ConfigureFromConfigurationOptions.cs (5)
14/// Configures an option instance by using <see cref="ConfigurationBinder.Bind(IConfiguration, object)"/> against an <see cref="IConfiguration"/>. 21/// Initializes a new instance of the <see cref="ConfigureFromConfigurationOptions{TOptions}"/> class using the specified <see cref="IConfiguration"/> instance to bind against. 23/// <param name="config">The <see cref="IConfiguration"/> instance.</param> 27public ConfigureFromConfigurationOptions(IConfiguration config)
NamedConfigureFromConfigurationOptions.cs (8)
12/// Configures an option instance by using <see cref="ConfigurationBinder.Bind(IConfiguration, object)"/> against an <see cref="IConfiguration"/>. 19/// Constructor that takes the <see cref="IConfiguration"/> instance to bind against. 22/// <param name="config">The <see cref="IConfiguration"/> instance.</param> 25public NamedConfigureFromConfigurationOptions(string? name, IConfiguration config) 30/// Constructor that takes the <see cref="IConfiguration"/> instance to bind against. 33/// <param name="config">The <see cref="IConfiguration"/> instance.</param> 37public NamedConfigureFromConfigurationOptions(string? name, IConfiguration config, Action<BinderOptions>? configureBinder)
OptionsBuilderConfigurationExtensions.cs (7)
28public static OptionsBuilder<TOptions> Bind<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this OptionsBuilder<TOptions> optionsBuilder, IConfiguration config) where TOptions : class 41public static OptionsBuilder<TOptions> Bind<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this OptionsBuilder<TOptions> optionsBuilder, IConfiguration config, Action<BinderOptions>? configureBinder) where TOptions : class 51/// the <see cref="IConfiguration"/> obtained from the DI service provider. 61/// <seealso cref="Bind{TOptions}(OptionsBuilder{TOptions}, IConfiguration, Action{BinderOptions})"/> 73optionsBuilder.Configure<IConfiguration>((opts, config) => 75IConfiguration section = string.Equals("", configSectionPath, StringComparison.OrdinalIgnoreCase) 83return new ConfigurationChangeTokenSource<TOptions>(optionsBuilder.Name, sp.GetRequiredService<IConfiguration>());
OptionsConfigurationServiceCollectionExtensions.cs (4)
25public static IServiceCollection Configure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this IServiceCollection services, IConfiguration config) where TOptions : class 38public static IServiceCollection Configure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this IServiceCollection services, string? name, IConfiguration config) where TOptions : class 51public static IServiceCollection Configure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this IServiceCollection services, IConfiguration config, Action<BinderOptions>? configureBinder) 66public static IServiceCollection Configure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TOptions>(this IServiceCollection services, string? name, IConfiguration config, Action<BinderOptions>? configureBinder)
Microsoft.Extensions.ServiceDiscovery (6)
Configuration\ConfigurationServiceEndpointProvider.cs (2)
22private readonly IConfiguration _configuration; 36IConfiguration configuration,
Configuration\ConfigurationServiceEndpointProviderFactory.cs (2)
12/// <see cref="IServiceEndpointProviderFactory"/> implementation that resolves services using <see cref="IConfiguration"/>. 15IConfiguration configuration,
ServiceDiscoveryServiceCollectionExtensions.cs (2)
78/// Configures a service discovery endpoint provider which uses <see cref="IConfiguration"/> to resolve endpoints. 88/// Configures a service discovery endpoint provider which uses <see cref="IConfiguration"/> to resolve endpoints.
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
DnsSrvServiceEndpointResolverTests.cs (1)
175.AddSingleton<IConfiguration>(config.Build())
Microsoft.Extensions.ServiceDiscovery.Tests (10)
ConfigurationServiceEndpointResolverTests.cs (7)
28.AddSingleton<IConfiguration>(config.Build()) 64.AddSingleton<IConfiguration>(config.Build()) 145.AddSingleton<IConfiguration>(config.Build()) 245.AddSingleton<IConfiguration>(config.Build()) 287.AddSingleton<IConfiguration>(config.Build()) 354.AddSingleton<IConfiguration>(config.Build()) 399.AddSingleton<IConfiguration>(config.Build())
PassThroughServiceEndpointResolverTests.cs (3)
55.AddSingleton<IConfiguration>(config.Build()) 88.AddSingleton<IConfiguration>(config.Build()) 122.AddSingleton<IConfiguration>(config.Build())
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (4)
YarpServiceDiscoveryTests.cs (4)
63.AddSingleton<IConfiguration>(config.Build()) 93.AddSingleton<IConfiguration>(config.Build()) 127.AddSingleton<IConfiguration>(config.Build()) 206.AddSingleton<IConfiguration>(config.Build())
Mvc.RoutingWebSite (2)
StartupForDynamicOrder.cs (2)
21public IConfiguration Configuration { get; } 23public StartupForDynamicOrder(IConfiguration configuration)
Negotiate.Client (2)
Startup.cs (2)
13public Startup(IConfiguration configuration) 18public IConfiguration Configuration { get; }
Negotiate.Server (2)
Startup.cs (2)
14public Startup(IConfiguration configuration) 19public IConfiguration Configuration { get; }
OpenIdConnectSample (2)
Startup.cs (2)
20public Startup(IConfiguration config, IWebHostEnvironment env) 26public IConfiguration Configuration { get; set; }
OrderProcessor (2)
OrderProcessingWorker.cs (2)
12private readonly IConfiguration _config; 17public OrderProcessingWorker(ILogger<OrderProcessingWorker> logger, IConfiguration config, IServiceProvider serviceProvider)
PathSchemeSelection (2)
Startup.cs (2)
14public Startup(IConfiguration configuration) 19public IConfiguration Configuration { get; }
Sample (1)
Transformers\AddExternalDocsTransformer.cs (1)
9public sealed class AddExternalDocsTransformer(IConfiguration configuration) : IOpenApiOperationTransformer, IOpenApiSchemaTransformer
SimpleWebSiteWithWebApplicationBuilder (1)
Program.cs (1)
45app.MapGet("/greeting", (IConfiguration config) => config["Greeting"]);
SocialSample (2)
Startup.cs (2)
25public Startup(IConfiguration config) 30public IConfiguration Configuration { get; set; }
StaticFilesAuth (2)
Startup.cs (2)
12public Startup(IConfiguration configuration, IWebHostEnvironment hostingEnvironment) 18public IConfiguration Configuration { get; }
Stress.TelemetryService (1)
TelemetryStresser.cs (1)
15public class TelemetryStresser(ILogger<TelemetryStresser> logger, IConfiguration config) : BackgroundService
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
16public static readonly IConfiguration Configuration;
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
16public static readonly IConfiguration Configuration;
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
16public static readonly IConfiguration Configuration;
Templates.Tests (1)
src\Shared\E2ETesting\E2ETestOptions.cs (1)
16public static readonly IConfiguration Configuration;
WsFedSample (2)
Startup.cs (2)
13public Startup(IConfiguration configuration) 18public IConfiguration Configuration { get; }