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