From 14e80c30229320226e716f32e6ba979013f8671b Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Sat, 26 Dec 2020 22:41:38 +0100 Subject: [PATCH] IL2CPP: Add statusCallback to LoadFromPackage and LoadFromFile --- Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs b/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs index 943d04f..0911d43 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs @@ -522,18 +522,18 @@ namespace Il2CppInspector } // Load from an AAB, IPA or one or more APK files - public static List LoadFromPackage(IEnumerable packageFiles, LoadOptions loadOptions = null, bool silent = false) { + public static List LoadFromPackage(IEnumerable packageFiles, LoadOptions loadOptions = null, EventHandler statusCallback = null, bool silent = false) { var streams = GetStreamsFromPackage(packageFiles, silent); if (!streams.HasValue) return null; - return LoadFromStream(streams.Value.Binary, streams.Value.Metadata, loadOptions, silent: silent); + return LoadFromStream(streams.Value.Binary, streams.Value.Metadata, loadOptions, statusCallback, silent); } // Load from a binary file and metadata file - public static List LoadFromFile(string binaryFile, string metadataFile, LoadOptions loadOptions = null, bool silent = false) + public static List LoadFromFile(string binaryFile, string metadataFile, LoadOptions loadOptions = null, EventHandler statusCallback = null, bool silent = false) => LoadFromStream(new FileStream(binaryFile, FileMode.Open, FileAccess.Read, FileShare.Read), new MemoryStream(File.ReadAllBytes(metadataFile)), - loadOptions, silent: silent); + loadOptions, statusCallback, silent); // Load from a binary stream and metadata stream // Must be a seekable stream otherwise we catch a System.IO.NotSupportedException