From 1410825163f8b0395739590628da6faadc296160 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 21 Dec 2024 16:26:22 -0500 Subject: [PATCH] code review feedback Replaced File.ReadAllText with Util.ReadAllText. --- .../AssetReader/BitterblackMazeAssetDeserializer.cs | 2 +- .../AssetReader/BonusDungeonAssetDeserializer.cs | 2 +- .../AssetReader/CostExpScalingAssetDeserializer.cs | 2 +- .../AssetReader/EnemySpawnAssetDeserializer.cs | 2 +- .../AssetReader/EpitaphRoadAssertDeserializer.cs | 2 +- .../AssetReader/EpitaphTrialAssetDeserializer.cs | 2 +- .../AssetReader/EventDropAssetDeserializer.cs | 2 +- Arrowgene.Ddon.Shared/AssetReader/GPCourseInfoDeserializer.cs | 2 +- .../AssetReader/LearnedNormalSkillsDeserializer.cs | 2 +- .../AssetReader/NamedParamAssetDeserializer.cs | 4 ++-- .../AssetReader/PawnCostReductionAssetDeserializer.cs | 2 +- Arrowgene.Ddon.Shared/AssetReader/QuestAssetDeserializer.cs | 2 +- .../AssetReader/QuestDropAssetDeserializer.cs | 2 +- .../AssetReader/RecruitmentBoardCategoryDeserializer.cs | 2 +- .../AssetReader/SecretAbilityDeserializer.cs | 2 +- Arrowgene.Ddon.Shared/AssetReader/SpecialShopDeserializer.cs | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Arrowgene.Ddon.Shared/AssetReader/BitterblackMazeAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/BitterblackMazeAssetDeserializer.cs index 8c9c1cc9a..f591c19a6 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/BitterblackMazeAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/BitterblackMazeAssetDeserializer.cs @@ -22,7 +22,7 @@ public BitterblackMazeAsset ReadPath(string path) BitterblackMazeAsset asset = new BitterblackMazeAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); var configurations = document.RootElement.GetProperty("maze_configurations").EnumerateObject(); diff --git a/Arrowgene.Ddon.Shared/AssetReader/BonusDungeonAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/BonusDungeonAssetDeserializer.cs index 6c436375b..a6225c127 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/BonusDungeonAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/BonusDungeonAssetDeserializer.cs @@ -18,7 +18,7 @@ public BonusDungeonAsset ReadPath(string path) BonusDungeonAsset asset = new BonusDungeonAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); foreach (var jCategory in document.RootElement.EnumerateArray()) diff --git a/Arrowgene.Ddon.Shared/AssetReader/CostExpScalingAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/CostExpScalingAssetDeserializer.cs index 7a95b1b0b..4a75139fc 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/CostExpScalingAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/CostExpScalingAssetDeserializer.cs @@ -18,7 +18,7 @@ public CostExpScalingAsset ReadPath(string path) CostExpScalingAsset asset = new CostExpScalingAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); var costExpInfoElements = document.RootElement.EnumerateArray().ToList(); diff --git a/Arrowgene.Ddon.Shared/AssetReader/EnemySpawnAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/EnemySpawnAssetDeserializer.cs index 78887f608..de7ef59a0 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/EnemySpawnAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/EnemySpawnAssetDeserializer.cs @@ -36,7 +36,7 @@ public EnemySpawnAsset ReadPath(string path) EnemySpawnAsset asset = new EnemySpawnAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); JsonElement schemasElement = document.RootElement.GetProperty("schemas"); diff --git a/Arrowgene.Ddon.Shared/AssetReader/EpitaphRoadAssertDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/EpitaphRoadAssertDeserializer.cs index cfb391bf0..057308e40 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/EpitaphRoadAssertDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/EpitaphRoadAssertDeserializer.cs @@ -20,7 +20,7 @@ public EpitaphRoadAsset ReadPath(string path) EpitaphRoadAsset asset = new EpitaphRoadAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); foreach (var jEpiPath in document.RootElement.GetProperty("paths").EnumerateArray()) diff --git a/Arrowgene.Ddon.Shared/AssetReader/EpitaphTrialAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/EpitaphTrialAssetDeserializer.cs index 97410e173..f40f171d1 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/EpitaphTrialAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/EpitaphTrialAssetDeserializer.cs @@ -37,7 +37,7 @@ public bool LoadTrialsFromDirectory(string path, EpitaphTrialAsset trialAssets) { Logger.Info($"{file.FullName}"); - string json = File.ReadAllText(file.FullName); + string json = Util.ReadAllText(file.FullName); JsonDocument document = JsonDocument.Parse(json); var assetData = new EpitaphTrial(); diff --git a/Arrowgene.Ddon.Shared/AssetReader/EventDropAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/EventDropAssetDeserializer.cs index ea9d0dbb0..a5fd073f8 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/EventDropAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/EventDropAssetDeserializer.cs @@ -19,7 +19,7 @@ public EventDropsAsset ReadPath(string path) EventDropsAsset asset = new EventDropsAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); foreach (var jEventItem in document.RootElement.EnumerateArray()) diff --git a/Arrowgene.Ddon.Shared/AssetReader/GPCourseInfoDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/GPCourseInfoDeserializer.cs index 404e9d460..a418b7865 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/GPCourseInfoDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/GPCourseInfoDeserializer.cs @@ -17,7 +17,7 @@ public GPCourseInfoAsset ReadPath(string path) GPCourseInfoAsset asset = new GPCourseInfoAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); var ValidCourses = document.RootElement.GetProperty("valid_courses").EnumerateArray().ToList(); diff --git a/Arrowgene.Ddon.Shared/AssetReader/LearnedNormalSkillsDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/LearnedNormalSkillsDeserializer.cs index 99ea5ad48..e2e045279 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/LearnedNormalSkillsDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/LearnedNormalSkillsDeserializer.cs @@ -18,7 +18,7 @@ public LearnedNormalSkillsAsset ReadPath(string path) LearnedNormalSkillsAsset asset = new LearnedNormalSkillsAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); // List Keys = document.RootElement.EnumerateObject().ToList diff --git a/Arrowgene.Ddon.Shared/AssetReader/NamedParamAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/NamedParamAssetDeserializer.cs index eb311eecb..7d98500af 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/NamedParamAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/NamedParamAssetDeserializer.cs @@ -16,7 +16,7 @@ public Dictionary ReadPath(string path) Dictionary namedParams = new Dictionary(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); JsonElement namedParamListElement = document.RootElement.GetProperty("namedParamList"); foreach (JsonElement namedParamListEntryElement in namedParamListElement.EnumerateArray()) @@ -54,4 +54,4 @@ public Dictionary ReadPath(string path) return namedParams; } } -} \ No newline at end of file +} diff --git a/Arrowgene.Ddon.Shared/AssetReader/PawnCostReductionAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/PawnCostReductionAssetDeserializer.cs index 8c13d74fa..168b29683 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/PawnCostReductionAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/PawnCostReductionAssetDeserializer.cs @@ -18,7 +18,7 @@ public PawnCostReductionAsset ReadPath(string path) var asset = new PawnCostReductionAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); using (JsonDocument document = JsonDocument.Parse(json)) { var costReductionElements = document.RootElement.EnumerateArray().ToList(); diff --git a/Arrowgene.Ddon.Shared/AssetReader/QuestAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/QuestAssetDeserializer.cs index ed18ca899..0f4baf9d0 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/QuestAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/QuestAssetDeserializer.cs @@ -39,7 +39,7 @@ public bool LoadQuestsFromDirectory(string path, QuestAsset questAssets) { Logger.Info($"{file.FullName}"); - string json = File.ReadAllText(file.FullName); + string json = Util.ReadAllText(file.FullName); JsonDocument document = JsonDocument.Parse(json); var jQuest = document.RootElement; diff --git a/Arrowgene.Ddon.Shared/AssetReader/QuestDropAssetDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/QuestDropAssetDeserializer.cs index 9efd15b1d..e61579a21 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/QuestDropAssetDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/QuestDropAssetDeserializer.cs @@ -19,7 +19,7 @@ public QuestDropItemAsset ReadPath(string path) QuestDropItemAsset asset = new QuestDropItemAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); JsonElement dropsTablesElement = document.RootElement.GetProperty("dropsTables"); diff --git a/Arrowgene.Ddon.Shared/AssetReader/RecruitmentBoardCategoryDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/RecruitmentBoardCategoryDeserializer.cs index 579e49fbc..4ac1b6d12 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/RecruitmentBoardCategoryDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/RecruitmentBoardCategoryDeserializer.cs @@ -16,7 +16,7 @@ public RecruitmentBoardCategoryAsset ReadPath(string path) RecruitmentBoardCategoryAsset asset = new RecruitmentBoardCategoryAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); foreach (var category in document.RootElement.EnumerateArray().ToList()) diff --git a/Arrowgene.Ddon.Shared/AssetReader/SecretAbilityDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/SecretAbilityDeserializer.cs index 4016e15ab..7f46a66b7 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/SecretAbilityDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/SecretAbilityDeserializer.cs @@ -18,7 +18,7 @@ public SecretAbilityAsset ReadPath(string path) SecretAbilityAsset asset = new SecretAbilityAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); var secretAbilities = document.RootElement.GetProperty("default_abilitiles").EnumerateArray().ToList(); diff --git a/Arrowgene.Ddon.Shared/AssetReader/SpecialShopDeserializer.cs b/Arrowgene.Ddon.Shared/AssetReader/SpecialShopDeserializer.cs index f54f4c426..4849b4f12 100644 --- a/Arrowgene.Ddon.Shared/AssetReader/SpecialShopDeserializer.cs +++ b/Arrowgene.Ddon.Shared/AssetReader/SpecialShopDeserializer.cs @@ -23,7 +23,7 @@ public SpecialShopAsset ReadPath(string path) SpecialShopAsset asset = new SpecialShopAsset(); - string json = File.ReadAllText(path); + string json = Util.ReadAllText(path); JsonDocument document = JsonDocument.Parse(json); uint categoryId = 0;