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