Prepare BTCPayServer for .netcore 3.0

This commit is contained in:
nicolas.dorier
2019-10-03 17:06:49 +09:00
parent 275fbc81e7
commit 4d84343a80
9 changed files with 61 additions and 23 deletions

View File

@@ -6,6 +6,11 @@ using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
#if NETCOREAPP21
using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
#else
using Microsoft.AspNetCore.Hosting;
#endif
namespace BTCPayServer.Services
{
@@ -27,7 +32,7 @@ namespace BTCPayServer.Services
{
private readonly Language[] _languages;
public LanguageService(IHostingEnvironment environment)
public LanguageService(IWebHostEnvironment environment)
{
var path = (environment as HostingEnvironment)?.WebRootPath;
if (string.IsNullOrEmpty(path))