diff --git a/BurnOutSharp/Tools/Utilities.cs b/BurnOutSharp/Tools/Utilities.cs index 34503cd8..109fb2ec 100644 --- a/BurnOutSharp/Tools/Utilities.cs +++ b/BurnOutSharp/Tools/Utilities.cs @@ -382,24 +382,28 @@ namespace BurnOutSharp.Tools } /// - /// Find the assembly manifest from a resource section, if possible + /// Find resource data in a ResourceSection, if possible /// /// ResourceSection from the executable - /// Full assembly manifest, null on error - private static string FindAssemblyManifest(ResourceSection rs) + /// String to use if checking for data starting with a string + /// String to use if checking for data contains a string + /// Full encoded resource data, null on error + private static string FindResourceInSection(ResourceSection rs, string dataStart = null, string dataContains = null) { if (rs == null) return null; - return FindAssemblyManifest(rs.ResourceDirectoryTable); + return FindResourceInTable(rs.ResourceDirectoryTable, dataStart, dataContains); } /// - /// Find the assembly manifest from a resource directory table, if possible + /// Find resource data in a ResourceDirectoryTable, if possible /// /// ResourceDirectoryTable representing a layer - /// Full assembly manifest, null on error - private static string FindAssemblyManifest(ResourceDirectoryTable rdt) + /// String to use if checking for data starting with a string + /// String to use if checking for data contains a string + /// Full encoded resource data, null on error + private static string FindResourceInTable(ResourceDirectoryTable rdt, string dataStart, string dataContains) { if (rdt == null) return null; @@ -408,12 +412,14 @@ namespace BurnOutSharp.Tools { if (rdte.IsResourceDataEntry() && rdte.DataEntry != null) { - if (rdte.DataEntry.EncodedData.StartsWith(" + /// Find the assembly manifest from a resource section, if possible + /// + /// ResourceSection from the executable + /// Full assembly manifest, null on error + private static string FindAssemblyManifest(ResourceSection rs) => FindResourceInSection(rs, dataStart: " /// Get the assembly identity node from an embedded manifest ///