Plugins: Refactor existing interfaces into ILoadPipeline
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
All rights reserved.
|
||||
*/
|
||||
|
||||
// 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;
|
||||
using NoisyCowStudios.Bin2Object;
|
||||
|
||||
// This is the ONLY line to update when the API version changes
|
||||
using Il2CppInspector.PluginAPI.V100;
|
||||
|
||||
namespace Il2CppInspector
|
||||
{
|
||||
@@ -17,25 +17,25 @@ namespace Il2CppInspector
|
||||
internal static class PluginHooks
|
||||
{
|
||||
public static PluginPreProcessMetadataEventInfo PreProcessMetadata(BinaryObjectStream stream)
|
||||
=> PluginManager.Try<IPreProcessMetadata, PluginPreProcessMetadataEventInfo>((p, e) => {
|
||||
=> PluginManager.Try<ILoadPipeline, PluginPreProcessMetadataEventInfo>((p, e) => {
|
||||
stream.Position = 0;
|
||||
p.PreProcessMetadata(stream, e);
|
||||
});
|
||||
|
||||
public static PluginPostProcessMetadataEventInfo PostProcessMetadata(Metadata metadata)
|
||||
=> PluginManager.Try<IPostProcessMetadata, PluginPostProcessMetadataEventInfo>((p, e) => p.PostProcessMetadata(metadata, e));
|
||||
=> PluginManager.Try<ILoadPipeline, PluginPostProcessMetadataEventInfo>((p, e) => p.PostProcessMetadata(metadata, e));
|
||||
|
||||
public static PluginGetStringsEventInfo GetStrings(Metadata metadata)
|
||||
=> PluginManager.Try<IGetStrings, PluginGetStringsEventInfo>((p, e) => p.GetStrings(metadata, e));
|
||||
=> PluginManager.Try<ILoadPipeline, PluginGetStringsEventInfo>((p, e) => p.GetStrings(metadata, e));
|
||||
|
||||
public static PluginGetStringLiteralsEventInfo GetStringLiterals(Metadata metadata)
|
||||
=> PluginManager.Try<IGetStringLiterals, PluginGetStringLiteralsEventInfo>((p, e) => p.GetStringLiterals(metadata, e));
|
||||
=> PluginManager.Try<ILoadPipeline, PluginGetStringLiteralsEventInfo>((p, e) => p.GetStringLiterals(metadata, e));
|
||||
|
||||
public static PluginPostProcessPackageEventInfo PostProcessPackage(Il2CppInspector package)
|
||||
=> PluginManager.Try<IPostProcessPackage, PluginPostProcessPackageEventInfo>((p, e) => p.PostProcessPackage(package, e));
|
||||
=> PluginManager.Try<ILoadPipeline, PluginPostProcessPackageEventInfo>((p, e) => p.PostProcessPackage(package, e));
|
||||
|
||||
public static PluginPostProcessTypeModelEventInfo PostProcessTypeModel(TypeModel typeModel)
|
||||
=> PluginManager.Try<IPostProcessTypeModel, PluginPostProcessTypeModelEventInfo>((p, e) => p.PostProcessTypeModel(typeModel, e));
|
||||
=> PluginManager.Try<ILoadPipeline, PluginPostProcessTypeModelEventInfo>((p, e) => p.PostProcessTypeModel(typeModel, e));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user