2 writes to HostingEnvironment
Microsoft.AspNetCore.Hosting (2)
GenericHost\WebHostBuilderBase.cs (1)
85
HostingEnvironment
= new HostingEnvironment(),
WebHostBuilder.cs (1)
265
_context.
HostingEnvironment
= _hostingEnvironment;
19 references to HostingEnvironment
Microsoft.AspNetCore (11)
ConfigureWebHostBuilder.cs (5)
26
_environment = webHostBuilderContext.
HostingEnvironment
;
41
var previousContentRoot = HostingPathResolver.ResolvePath(_context.
HostingEnvironment
.ContentRootPath);
43
var previousWebRoot = HostingPathResolver.ResolvePath(_context.
HostingEnvironment
.WebRootPath, previousContentRoot);
118
var previousContentRoot = HostingPathResolver.ResolvePath(_context.
HostingEnvironment
.ContentRootPath);
119
var previousWebRoot = HostingPathResolver.ResolvePath(_context.
HostingEnvironment
.WebRootPath);
WebApplicationBuilder.cs (2)
213
Environment = webHostContext.
HostingEnvironment
;
402
if (allowDeveloperExceptionPage && context.
HostingEnvironment
.IsDevelopment())
WebHost.cs (4)
174
var env = hostingContext.
HostingEnvironment
;
213
options.ValidateScopes = context.
HostingEnvironment
.IsDevelopment();
225
if (ctx.
HostingEnvironment
.IsDevelopment())
227
StaticWebAssetsLoader.UseStaticWebAssets(ctx.
HostingEnvironment
, ctx.Configuration);
Microsoft.AspNetCore.Hosting (8)
GenericHost\GenericWebHostBuilder.cs (4)
58
services.AddSingleton(webhostContext.
HostingEnvironment
);
60
services.AddSingleton((AspNetCore.Hosting.IHostingEnvironment)webhostContext.
HostingEnvironment
);
102
var startupType = StartupLoader.FindStartupType(webHostOptions.StartupAssembly!, webhostContext.
HostingEnvironment
.EnvironmentName);
388
return _context.
HostingEnvironment
;
GenericHost\SlimWebHostBuilder.cs (2)
34
services.AddSingleton(webhostContext.
HostingEnvironment
);
36
services.AddSingleton((AspNetCore.Hosting.IHostingEnvironment)webhostContext.
HostingEnvironment
);
GenericHost\WebHostBuilderBase.cs (1)
87
webHostBuilderContext.
HostingEnvironment
.Initialize(context.HostingEnvironment.ContentRootPath, options, baseEnvironment: context.HostingEnvironment);
WebHostBuilderExtensions.cs (1)
256
StaticWebAssetsLoader.UseStaticWebAssets(context.
HostingEnvironment
, context.Configuration);