Cleanup netcore21 specific code

This commit is contained in:
nicolas.dorier
2020-01-12 13:30:54 +09:00
parent 9876208b7d
commit 629dfcf152
24 changed files with 9 additions and 144 deletions

View File

@@ -5,12 +5,7 @@ using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization;
#if NETCOREAPP21
using IWebHostEnvironment = Microsoft.AspNetCore.Hosting.IHostingEnvironment;
using Microsoft.AspNetCore.Hosting.Internal;
#else
using Microsoft.AspNetCore.Hosting;
#endif
namespace BTCPayServer.Services
{
@@ -34,11 +29,7 @@ namespace BTCPayServer.Services
public LanguageService(IWebHostEnvironment environment)
{
#if NETCOREAPP21
var path = (environment as HostingEnvironment)?.WebRootPath;
#else
var path = environment.WebRootPath;
#endif
path = Path.Combine(path, "locales");
var files = Directory.GetFiles(path, "*.json");
var result = new List<Language>();