mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Cleanup netcore21 specific code
This commit is contained in:
@@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user