1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

Initial .net 6 upgrades

This commit is contained in:
RaidMax
2022-01-26 10:32:16 -06:00
parent 513f0afd34
commit 6f6dd035ee
170 changed files with 2805 additions and 2577 deletions

View File

@ -1,12 +1,21 @@
using SharedLibraryCore.Interfaces;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Globalization;
using SharedLibraryCore.Interfaces;
namespace SharedLibraryCore.Localization
{
public class Layout
{
private string localizationName;
public Layout(Dictionary<string, string> set)
{
LocalizationIndex = new TranslationLookup
{
Set = set
};
}
public string LocalizationName
{
get => localizationName;
@ -16,16 +25,9 @@ namespace SharedLibraryCore.Localization
Culture = new CultureInfo(value);
}
}
public TranslationLookup LocalizationIndex { get; set; }
public CultureInfo Culture { get; private set; }
public Layout(Dictionary<string, string> set)
{
LocalizationIndex = new TranslationLookup()
{
Set = set
};
}
}
public class TranslationLookup : ITranslationLookup
@ -36,13 +38,13 @@ namespace SharedLibraryCore.Localization
{
get
{
if (!Set.TryGetValue(key, out string value))
if (!Set.TryGetValue(key, out var value))
{
return key;
}
return value;
}
}
}
}
}

View File

@ -7,4 +7,4 @@ namespace SharedLibraryCore.Localization
public Permission Level { get; set; }
public string Name { get; set; }
}
}
}