Plugins: Change PreProcessMetadata to use BinaryObjectStream

This commit is contained in:
Katy Coe
2020-12-21 21:40:38 +01:00
parent 5dc8e823c4
commit 6971c84960
2 changed files with 4 additions and 2 deletions

View File

@@ -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
/// </summary>
public interface IPreProcessMetadata
{
void PreProcessMetadata(MemoryStream stream, PluginPreProcessMetadataEventInfo data);
void PreProcessMetadata(BinaryObjectStream stream, PluginPreProcessMetadataEventInfo data);
}
/// <summary>

View File

@@ -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<IPostProcessMetadata, PluginPostProcessMetadataEventInfo>((p, e) => p.PostProcessMetadata(metadata, e));
public static PluginPreProcessMetadataEventInfo PreProcessMetadata(MemoryStream stream)
public static PluginPreProcessMetadataEventInfo PreProcessMetadata(BinaryObjectStream stream)
=> PluginManager.Try<IPreProcessMetadata, PluginPreProcessMetadataEventInfo>((p, e) => {
stream.Position = 0;
p.PreProcessMetadata(stream, e);