From 6971c849602667036556d24a46d202f32f4ac580 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Mon, 21 Dec 2020 21:40:38 +0100 Subject: [PATCH] Plugins: Change PreProcessMetadata to use BinaryObjectStream --- Il2CppInspector.Common/Plugins/API/V100/Hooks.cs | 3 ++- Il2CppInspector.Common/Plugins/PluginHooks.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/Plugins/API/V100/Hooks.cs b/Il2CppInspector.Common/Plugins/API/V100/Hooks.cs index 355a75f..91686b9 100644 --- a/Il2CppInspector.Common/Plugins/API/V100/Hooks.cs +++ b/Il2CppInspector.Common/Plugins/API/V100/Hooks.cs @@ -6,6 +6,7 @@ using System; using System.IO; +using NoisyCowStudios.Bin2Object; using Il2CppInspector.Reflection; namespace Il2CppInspector.PluginAPI.V100 @@ -16,7 +17,7 @@ namespace Il2CppInspector.PluginAPI.V100 /// public interface IPreProcessMetadata { - void PreProcessMetadata(MemoryStream stream, PluginPreProcessMetadataEventInfo data); + void PreProcessMetadata(BinaryObjectStream stream, PluginPreProcessMetadataEventInfo data); } /// diff --git a/Il2CppInspector.Common/Plugins/PluginHooks.cs b/Il2CppInspector.Common/Plugins/PluginHooks.cs index 37e658d..ea32e18 100644 --- a/Il2CppInspector.Common/Plugins/PluginHooks.cs +++ b/Il2CppInspector.Common/Plugins/PluginHooks.cs @@ -6,6 +6,7 @@ // This is the ONLY line to update when the API version changes using System.IO; +using NoisyCowStudios.Bin2Object; using Il2CppInspector.PluginAPI.V100; using Il2CppInspector.Reflection; @@ -17,7 +18,7 @@ namespace Il2CppInspector public static PluginPostProcessMetadataEventInfo PostProcessMetadata(Metadata metadata) => PluginManager.Try((p, e) => p.PostProcessMetadata(metadata, e)); - public static PluginPreProcessMetadataEventInfo PreProcessMetadata(MemoryStream stream) + public static PluginPreProcessMetadataEventInfo PreProcessMetadata(BinaryObjectStream stream) => PluginManager.Try((p, e) => { stream.Position = 0; p.PreProcessMetadata(stream, e);