2 implementations of IHostingEnvironment
Microsoft.AspNetCore.Hosting (1)
Internal\HostingEnvironment.cs (1)
11internal sealed class HostingEnvironment : IHostingEnvironment, Extensions.Hosting.IHostingEnvironment, IWebHostEnvironment
Microsoft.Extensions.Hosting (1)
Internal\HostingEnvironment.cs (1)
15public class HostingEnvironment : IHostingEnvironment, IHostEnvironment
14 references to IHostingEnvironment
Microsoft.AspNetCore.Hosting (2)
GenericHost\GenericWebHostBuilder.cs (1)
373if (serviceType == typeof(Microsoft.Extensions.Hosting.IHostingEnvironment)
WebHostBuilder.cs (1)
271services.AddSingleton<Extensions.Hosting.IHostingEnvironment>(_hostingEnvironment);
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (2)
615Assert.Equal(expected, host.Services.GetService<Extensions.Hosting.IHostingEnvironment>().EnvironmentName); 663Assert.Equal("/", host.Services.GetService<Extensions.Hosting.IHostingEnvironment>().ContentRootPath);
Microsoft.Extensions.Hosting (1)
HostBuilder.cs (1)
301services.AddSingleton<IHostingEnvironment>(hostingEnvironment);
Microsoft.Extensions.Hosting.Abstractions (9)
HostingEnvironmentExtensions.cs (9)
10/// Extension methods for <see cref="IHostingEnvironment"/>. 17/// <param name="hostingEnvironment">An instance of <see cref="IHostingEnvironment"/>.</param> 19public static bool IsDevelopment(this IHostingEnvironment hostingEnvironment) 29/// <param name="hostingEnvironment">An instance of <see cref="IHostingEnvironment"/>.</param> 31public static bool IsStaging(this IHostingEnvironment hostingEnvironment) 41/// <param name="hostingEnvironment">An instance of <see cref="IHostingEnvironment"/>.</param> 43public static bool IsProduction(this IHostingEnvironment hostingEnvironment) 53/// <param name="hostingEnvironment">An instance of <see cref="IHostingEnvironment"/>.</param> 57this IHostingEnvironment hostingEnvironment,