Plugins: Change PreProcessMetadata to use BinaryObjectStream
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using NoisyCowStudios.Bin2Object;
|
||||||
using Il2CppInspector.Reflection;
|
using Il2CppInspector.Reflection;
|
||||||
|
|
||||||
namespace Il2CppInspector.PluginAPI.V100
|
namespace Il2CppInspector.PluginAPI.V100
|
||||||
@@ -16,7 +17,7 @@ namespace Il2CppInspector.PluginAPI.V100
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IPreProcessMetadata
|
public interface IPreProcessMetadata
|
||||||
{
|
{
|
||||||
void PreProcessMetadata(MemoryStream stream, PluginPreProcessMetadataEventInfo data);
|
void PreProcessMetadata(BinaryObjectStream stream, PluginPreProcessMetadataEventInfo data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
// This is the ONLY line to update when the API version changes
|
// This is the ONLY line to update when the API version changes
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using NoisyCowStudios.Bin2Object;
|
||||||
using Il2CppInspector.PluginAPI.V100;
|
using Il2CppInspector.PluginAPI.V100;
|
||||||
using Il2CppInspector.Reflection;
|
using Il2CppInspector.Reflection;
|
||||||
|
|
||||||
@@ -17,7 +18,7 @@ namespace Il2CppInspector
|
|||||||
public static PluginPostProcessMetadataEventInfo PostProcessMetadata(Metadata metadata)
|
public static PluginPostProcessMetadataEventInfo PostProcessMetadata(Metadata metadata)
|
||||||
=> PluginManager.Try<IPostProcessMetadata, PluginPostProcessMetadataEventInfo>((p, e) => p.PostProcessMetadata(metadata, e));
|
=> 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) => {
|
=> PluginManager.Try<IPreProcessMetadata, PluginPreProcessMetadataEventInfo>((p, e) => {
|
||||||
stream.Position = 0;
|
stream.Position = 0;
|
||||||
p.PreProcessMetadata(stream, e);
|
p.PreProcessMetadata(stream, e);
|
||||||
|
|||||||
Reference in New Issue
Block a user