Implemented interface member:

property
this
Microsoft.Extensions.Configuration.IConfiguration.this[System.String]
176 writes to
Aspire.Cli.Tests (1)
Aspire.Hosting.Azure.Tests (29)
Aspire.Hosting.Containers.Tests (7)
Aspire.Hosting.Garnet.Tests (4)
Aspire.Hosting.GitHub.Models.Tests (23)
Aspire.Hosting.Kafka.Tests (3)
Aspire.Hosting.Milvus.Tests (3)
Aspire.Hosting.MongoDB.Tests (5)
Aspire.Hosting.MySql.Tests (5)
Aspire.Hosting.Nats.Tests (5)
Aspire.Hosting.OpenAI.Tests (16)
Aspire.Hosting.Oracle.Tests (5)
Aspire.Hosting.PostgreSQL.Tests (6)
Aspire.Hosting.Python.Tests (1)
Aspire.Hosting.RabbitMQ.Tests (3)
Aspire.Hosting.Redis.Tests (1)
Aspire.Hosting.SqlServer.Tests (5)
Aspire.Hosting.Testing.Tests (2)
Aspire.Hosting.Tests (38)
Aspire.Hosting.Valkey.Tests (1)
Aspire.Playground.Tests (1)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.StaticAssets.Tests (2)
Microsoft.AspNetCore.Tests (4)
TestingAppHost1.AppHost (1)
TestProject.AppHost (4)
109 references to
aspire (3)
Aspire.Azure.Security.KeyVault.Tests (2)
Aspire.Dashboard.Tests (3)
Aspire.Hosting (8)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.Functions (1)
Aspire.Hosting.GitHub.Models (1)
Aspire.Hosting.OpenAI (1)
Aspire.Hosting.Testing (5)
Aspire.Hosting.Testing.Tests (4)
Aspire.Hosting.Tests (8)
Microsoft.AspNetCore (40)
ConfigureWebHostBuilder.cs (25)
42var previousContentRootConfig = _configuration[WebHostDefaults.ContentRootKey];
44var previousWebRootConfig = _configuration[WebHostDefaults.WebRootKey];
45var previousApplication = _configuration[WebHostDefaults.ApplicationKey];
46var previousEnvironment = _configuration[WebHostDefaults.EnvironmentKey];
47var previousHostingStartupAssemblies = _configuration[WebHostDefaults.HostingStartupAssembliesKey];
48var previousHostingStartupAssembliesExclude = _configuration[WebHostDefaults.HostingStartupExcludeAssembliesKey];
53if (!string.Equals(previousWebRootConfig, _configuration[WebHostDefaults.WebRootKey], StringComparison.OrdinalIgnoreCase)
54&& !string.Equals(HostingPathResolver.ResolvePath(previousWebRoot, previousContentRoot), HostingPathResolver.ResolvePath(_configuration[WebHostDefaults.WebRootKey], previousContentRoot), StringComparison.OrdinalIgnoreCase))
57throw new NotSupportedException($"The web root changed from \"{HostingPathResolver.ResolvePath(previousWebRoot, previousContentRoot)}\" to \"{HostingPathResolver.ResolvePath(_configuration[WebHostDefaults.WebRootKey], previousContentRoot)}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
59else if (!string.Equals(previousApplication, _configuration[WebHostDefaults.ApplicationKey], StringComparison.OrdinalIgnoreCase))
62throw new NotSupportedException($"The application name changed from \"{previousApplication}\" to \"{_configuration[WebHostDefaults.ApplicationKey]}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
64else if (!string.Equals(previousContentRootConfig, _configuration[WebHostDefaults.ContentRootKey], StringComparison.OrdinalIgnoreCase)
65&& !string.Equals(previousContentRoot, HostingPathResolver.ResolvePath(_configuration[WebHostDefaults.ContentRootKey]), StringComparison.OrdinalIgnoreCase))
68throw new NotSupportedException($"The content root changed from \"{previousContentRoot}\" to \"{HostingPathResolver.ResolvePath(_configuration[WebHostDefaults.ContentRootKey])}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
70else if (!string.Equals(previousEnvironment, _configuration[WebHostDefaults.EnvironmentKey], StringComparison.OrdinalIgnoreCase))
73throw new NotSupportedException($"The environment changed from \"{previousEnvironment}\" to \"{_configuration[WebHostDefaults.EnvironmentKey]}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
75else if (!string.Equals(previousHostingStartupAssemblies, _configuration[WebHostDefaults.HostingStartupAssembliesKey], StringComparison.OrdinalIgnoreCase))
78throw new NotSupportedException($"The hosting startup assemblies changed from \"{previousHostingStartupAssemblies}\" to \"{_configuration[WebHostDefaults.HostingStartupAssembliesKey]}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
80else if (!string.Equals(previousHostingStartupAssembliesExclude, _configuration[WebHostDefaults.HostingStartupExcludeAssembliesKey], StringComparison.OrdinalIgnoreCase))
83throw new NotSupportedException($"The hosting startup assemblies exclude list changed from \"{previousHostingStartupAssembliesExclude}\" to \"{_configuration[WebHostDefaults.HostingStartupExcludeAssembliesKey]}\". Changing the host configuration using WebApplicationBuilder.WebHost is not supported. Use WebApplication.CreateBuilder(WebApplicationOptions) instead.");
106return _configuration[key];
120var previousApplication = _configuration[WebHostDefaults.ApplicationKey];
121var previousEnvironment = _configuration[WebHostDefaults.EnvironmentKey];
122var previousHostingStartupAssemblies = _configuration[WebHostDefaults.HostingStartupAssembliesKey];
123var previousHostingStartupAssembliesExclude = _configuration[WebHostDefaults.HostingStartupExcludeAssembliesKey];
Microsoft.AspNetCore.Tests (19)
WebApplicationTests.cs (19)
176Assert.Equal("http://localhost:5001", builder.Configuration["urls"]);
1031Assert.Equal("command_line_one", builder.Configuration["one"]);
1032Assert.Equal("unprefixed_two", builder.Configuration["two"]);
1033Assert.Equal("DOTNET_three", builder.Configuration["three"]);
1034Assert.Equal("ASPNETCORE_four", builder.Configuration["four"]);
1045Assert.Equal("1", builder.Configuration["x"]);
1046Assert.Equal("Larry", builder.Configuration["name"]);
1047Assert.Equal("20", builder.Configuration["age"]);
1048Assert.Equal("Testing", builder.Configuration["environment"]);
1111Assert.Equal("value", builder.Configuration["A"]);
1112Assert.Equal("another", builder.Configuration["B"]);
1166Assert.Equal("A", builder.Configuration["A"]);
1167Assert.Equal("B", builder.Configuration["B"]);
1168Assert.Equal("C", builder.Configuration["C"]);
1169Assert.Equal("D", builder.Configuration["D"]);
1170Assert.Equal("E", builder.Configuration["E"]);
1171Assert.Equal("F", builder.Configuration["F"]);
1431Assert.Equal("bar", builder.Configuration["foo"]);
1529Assert.Equal("bar", builder.Configuration["foo"]);
Microsoft.Extensions.Hosting (9)
Publishers.AppHost (1)
TestingAppHost1.AppHost (2)
WebFrontEnd (1)