1 write to Environment
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
211Environment = webHostContext.HostingEnvironment;
33 references to Environment
Microsoft.AspNetCore (2)
WebApplicationBuilder.cs (2)
201[MemberNotNull(nameof(Environment), nameof(Host), nameof(WebHost))] 370IHostEnvironment IHostApplicationBuilder.Environment => Environment;
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
597builder.Environment.WebRootFileProvider = new TestFileProvider(new TestResource[]
Microsoft.AspNetCore.Tests (30)
WebApplicationTests.cs (30)
514Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 515Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 543Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 544Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 585Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 586Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 627Assert.Equal(NormalizePath(AppContext.BaseDirectory), NormalizePath(builder.Environment.ContentRootPath)); 651Assert.Equal(NormalizePath(Environment.CurrentDirectory), NormalizePath(builder.Environment.ContentRootPath)); 676Assert.Equal(NormalizePath(AppContext.BaseDirectory), NormalizePath(builder.Environment.ContentRootPath)); 814Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 815Assert.Equal(envName, builder.Environment.EnvironmentName); 816Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 817Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 863Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 864Assert.Equal(envName, builder.Environment.EnvironmentName); 865Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 866Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 909Assert.Equal(nameof(WebApplicationTests), builder.Environment.ApplicationName); 910Assert.Equal(envName, builder.Environment.EnvironmentName); 911Assert.Equal(contentRoot, builder.Environment.ContentRootPath); 912Assert.Equal(fullWebRootPath, builder.Environment.WebRootPath); 938Assert.Equal(assemblyName, builder.Environment.ApplicationName); 980Assert.Equal(assemblyName, builder.Environment.ApplicationName); 1047Assert.Equal("Testing", builder.Environment.EnvironmentName); 2258Assert.Equal(builder.Environment.ApplicationName, hostEnv.ApplicationName); 2259Assert.Equal(builder.Environment.EnvironmentName, hostEnv.EnvironmentName); 2260Assert.Equal(builder.Environment.ContentRootPath, hostEnv.ContentRootPath); 2288Assert.Equal(builder.Environment.ApplicationName, hostEnv.ApplicationName); 2289Assert.Equal(builder.Environment.EnvironmentName, hostEnv.EnvironmentName); 2290Assert.Equal(builder.Environment.ContentRootPath, hostEnv.ContentRootPath);