diff --git a/NetEvent/Server/Extensions/DefaultCultureExtension.cs b/NetEvent/Server/Extensions/DefaultCultureExtension.cs index 775aaf6f..617201e0 100644 --- a/NetEvent/Server/Extensions/DefaultCultureExtension.cs +++ b/NetEvent/Server/Extensions/DefaultCultureExtension.cs @@ -6,8 +6,6 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NetEvent.Server.Data; -using NetEvent.Server.Models; -using NetEvent.Shared; using NetEvent.Shared.Config; namespace NetEvent.Server.Extensions; @@ -24,7 +22,7 @@ public static Task SetDefaultCulture(this WebApplication app) { using (var context = scope.ServiceProvider.GetRequiredService()) { - var organizationCulture = new SystemSettings.OrganizationData().Settings.Select(x => x.Key.Equals(SystemSettings.OrganizationData.DataCultureInfo)).ToString();; + var organizationCulture = new SystemSettings.OrganizationData().Settings.Select(x => x.Key.Equals(SystemSettings.OrganizationData.DataCultureInfo, StringComparison.OrdinalIgnoreCase)).ToString(); if (organizationCulture == null) { return Task.CompletedTask; diff --git a/NetEvent/Server/Modules/System/Endpoints/GetSystemInfo.cs b/NetEvent/Server/Modules/System/Endpoints/GetSystemInfo.cs index 0ea7497e..901ffee1 100644 --- a/NetEvent/Server/Modules/System/Endpoints/GetSystemInfo.cs +++ b/NetEvent/Server/Modules/System/Endpoints/GetSystemInfo.cs @@ -4,10 +4,8 @@ using System.Threading; using System.Threading.Tasks; using MediatR; -using NetEvent.Shared.Dto; -using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Localization; -using NetEvent.Server; +using NetEvent.Shared.Dto; namespace NetEvent.Server.Modules.System.Endpoints { @@ -16,12 +14,12 @@ public static class GetSystemInfo public sealed class Handler : IRequestHandler { // TODO: remove localizer as soon as it is implemented somewhere where it makes sense - private IStringLocalizer _Localizer { get; set; } + private IStringLocalizer Localizer { get; set; } // TODO: remove localizer as soon as it is implemented somewhere where it makes sense public Handler(IStringLocalizer localizer) { - _Localizer = localizer; + Localizer = localizer; } public Task Handle(Request request, CancellationToken cancellationToken) @@ -50,7 +48,7 @@ public Task Handle(Request request, CancellationToken cancellationToke var systeminfo = new SystemInfoDto(systeminfocomponents, systeminfohealth, systeminfoversions); // TODO: remove localizer as soon as it is implemented somewhere where it makes sense - Console.WriteLine(_Localizer["test.test"]); + Console.WriteLine(Localizer["test.test"]); return Task.FromResult(new Response(systeminfo)); } diff --git a/NetEvent/Server/Modules/System/Endpoints/PostSystemSetting.cs b/NetEvent/Server/Modules/System/Endpoints/PostSystemSetting.cs index 8cb04f7b..628f8d86 100644 --- a/NetEvent/Server/Modules/System/Endpoints/PostSystemSetting.cs +++ b/NetEvent/Server/Modules/System/Endpoints/PostSystemSetting.cs @@ -1,4 +1,5 @@ -using System.Threading; +using System.Globalization; +using System.Threading; using System.Threading.Tasks; using MediatR; using NetEvent.Server.Data; @@ -6,7 +7,6 @@ using NetEvent.Shared; using NetEvent.Shared.Config; using NetEvent.Shared.Dto; -using System.Globalization; namespace NetEvent.Server.Modules.System.Endpoints {