mirror of https://github.com/abpframework/abp.git
Browse Source
When IWebHostEnvironment is not injected, hostGetHostingEnvironment will return an empty one instead of throwing exceptionpull/11031/head
committed by
GitHub
2 changed files with 33 additions and 2 deletions
@ -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