From e4237fedeff925c0e4a0e1c1fb68be524ea62416 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 21 May 2024 20:49:26 -0400 Subject: [PATCH] Remove another redundant GetFullFile --- CHANGELIST.md | 1 + .../ExecutionContexts/BaseExecutionContext.cs | 22 ------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 2708dc00..4c265a02 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -33,6 +33,7 @@ - Separate out copy protection run - Remove duplicate GetFullFile method - Move GetBase64 to InfoTool +- Remove another redundant GetFullFile ### 3.1.9a (2024-05-21) diff --git a/MPF.Core/ExecutionContexts/BaseExecutionContext.cs b/MPF.Core/ExecutionContexts/BaseExecutionContext.cs index deba72a8..29403699 100644 --- a/MPF.Core/ExecutionContexts/BaseExecutionContext.cs +++ b/MPF.Core/ExecutionContexts/BaseExecutionContext.cs @@ -280,28 +280,6 @@ namespace MPF.Core.ExecutionContexts protected static bool DoesExist(List parameters, int index) => index < parameters.Count; - /// - /// Get the full lines from the input file, if possible - /// - /// file location - /// True if should read as binary, false otherwise (default) - /// Full text of the file, null on error - protected static string? GetFullFile(string filename, bool binary = false) - { - // If the file doesn't exist, we can't get info from it - if (!File.Exists(filename)) - return null; - - // If we're reading as binary - if (binary) - { - byte[] bytes = File.ReadAllBytes(filename); - return BitConverter.ToString(bytes).Replace("-", string.Empty); - } - - return File.ReadAllText(filename); - } - /// /// Gets if the flag is supported by the current command ///