mirror of https://github.com/abpframework/abp
When IWebHostEnvironment is not injected, hostGetHostingEnvironment now returns an empty one instead of throwing exception
parent
5837a897b5
commit
96e4aeaf83
@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
|
||||
namespace Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
internal class EmptyHostingEnvironment : IWebHostEnvironment
|
||||
{
|
||||
public string EnvironmentName { get; set; }
|
||||
|
||||
public string ApplicationName { get; set; }
|
||||
|
||||
public string WebRootPath { get; set; }
|
||||
|
||||
public IFileProvider WebRootFileProvider { get; set; }
|
||||
|
||||
public string ContentRootPath { get; set; }
|
||||
|
||||
public IFileProvider ContentRootFileProvider { get; set; }
|
||||
}
|
Loading…
Reference in new issue