Fix struct name not following C# standards

This commit is contained in:
LotP1 2024-12-18 14:53:01 +01:00
parent d7fb320779
commit 7bf117f7c9
3 changed files with 7 additions and 7 deletions

View file

@ -26,7 +26,7 @@ namespace Ryujinx.BuildValidationTasks
data = sr.ReadToEnd(); data = sr.ReadToEnd();
} }
LocalesJSON json = JsonConvert.DeserializeObject<LocalesJSON>(data); LocalesJson json = JsonConvert.DeserializeObject<LocalesJson>(data);
for (int i = 0; i < json.Locales.Count; i++) for (int i = 0; i < json.Locales.Count; i++)
{ {
@ -55,7 +55,7 @@ namespace Ryujinx.BuildValidationTasks
return true; return true;
} }
struct LocalesJSON struct LocalesJson
{ {
public List<string> Languages { get; set; } public List<string> Languages { get; set; }
public List<LocalesEntry> Locales { get; set; } public List<LocalesEntry> Locales { get; set; }

View file

@ -158,7 +158,7 @@ namespace Ryujinx.Ava.Common.Locale
return null; return null;
} }
LocalesJSON json = JsonHelper.Deserialize(fileData, LocalesJSONContext.Default.LocalesJSON); LocalesJson json = JsonHelper.Deserialize(fileData, LocalesJsonContext.Default.LocalesJSON);
foreach (LocalesEntry locale in json.Locales) foreach (LocalesEntry locale in json.Locales)
{ {
@ -186,7 +186,7 @@ namespace Ryujinx.Ava.Common.Locale
} }
} }
public struct LocalesJSON public struct LocalesJson
{ {
public List<string> Languages { get; set; } public List<string> Languages { get; set; }
public List<LocalesEntry> Locales { get; set; } public List<LocalesEntry> Locales { get; set; }
@ -199,6 +199,6 @@ namespace Ryujinx.Ava.Common.Locale
} }
[JsonSourceGenerationOptions(WriteIndented = true)] [JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(LocalesJSON))] [JsonSerializable(typeof(LocalesJson))]
internal partial class LocalesJSONContext : JsonSerializerContext { } internal partial class LocalesJsonContext : JsonSerializerContext { }
} }

View file

@ -57,7 +57,7 @@ namespace Ryujinx.Ava.UI.Views.Main
string languageJson = EmbeddedResources.ReadAllText(localePath); string languageJson = EmbeddedResources.ReadAllText(localePath);
LocalesJSON locales = JsonHelper.Deserialize(languageJson, LocalesJSONContext.Default.LocalesJSON); LocalesJson locales = JsonHelper.Deserialize(languageJson, LocalesJsonContext.Default.LocalesJSON);
foreach (string language in locales.Languages) foreach (string language in locales.Languages)
{ {