/* Copyright 2020-2021 Katy Coe - http://www.djkaty.com - https://github.com/djkaty All rights reserved. */ using System; using System.Collections.Generic; using System.Text; namespace Il2CppInspector.PluginAPI.V100 { /// /// Object which allows plugins to report on what has happened during a call /// Changes made to this object propagate to the next plugin in the call chain until FullyProcessed is set to true /// public class PluginEventInfo { /// /// A plugin should set this if it has processed the supplied data in such a way that no further processing is required by other plugins /// Generally, this will prevent other plugins from processing the data /// Note that this should be set even if the processed data was invalid () /// If this is not set, the same event will be raised on the next available plugin /// Note that you can still do processing but set FullyProcessed to false to allow additional processing from other plugins /// public bool FullyProcessed { get; set; } = false; /// /// A plugin should set this when the data it processed was invalid, for example if the processing gave an unexpected result /// public bool IsInvalid { get; set; } = false; /// /// A plugin should set this when it has directly modified the provided data structure (object) /// This can be set even if FullyProcessed = false to indicate that changes have been made but more plugins can still be called /// Should be set to false if you have only queried (performed reads) on the data without changing it /// public bool IsDataModified { get; set; } = false; /// /// A plugin should set this when it has directly modified the supplied or underlying stream for the metadata or binary /// This can be set even if FullyProcessed = false to indicate that changes have been made but more plugins can still be called /// Should be set to false if you have only queried (performed reads) on the stream without changing it /// public bool IsStreamModified { get; set; } = false; /// /// This wiil be set automatically by Il2CppInspector to the last exception thrown by a plugin for the current event /// public PluginErrorEventArgs Error { get; set; } = null; } /// /// Event info for OptionsChanged /// public class PluginOptionsChangedEventInfo : PluginEventInfo { } /// /// Event info for LoadPipelineStarting /// public class PluginLoadPipelineStartingEventInfo : PluginEventInfo { } /// /// Event info for PreProcessMetadata /// public class PluginPreProcessMetadataEventInfo : PluginEventInfo { /// /// Set to true to disable some validation checks by Il2CppInspector that the metadata is valid /// public bool SkipValidation { get; set; } } /// /// Event info for PostProcessMetadata /// public class PluginPostProcessMetadataEventInfo : PluginEventInfo { } /// /// Event info for GetStrings /// public class PluginGetStringsEventInfo : PluginEventInfo { /// /// All of the fetched strings to be returned /// public Dictionary Strings { get; set; } = new Dictionary(); } /// /// Event info for GetStringLiterals /// public class PluginGetStringLiteralsEventInfo : PluginEventInfo { /// /// All of the fetched string literals to be returned /// public List StringLiterals { get; set; } = new List(); } /// /// Event info for PreProcessImage /// public class PluginPreProcessImageEventInfo : PluginEventInfo { } /// /// Event info for PostProcessImage /// public class PluginPostProcessImageEventInfo : PluginEventInfo { } /// /// Event info for PreProcessBinary /// public class PluginPreProcessBinaryEventInfo : PluginEventInfo { } /// /// Event info for PostProcessBinary /// public class PluginPostProcessBinaryEventInfo : PluginEventInfo { } /// /// Event info for PostProcessPackage /// public class PluginPostProcessPackageEventInfo : PluginEventInfo { } /// /// Event info for PostProcessTypeModel /// public class PluginPostProcessTypeModelEventInfo : PluginEventInfo { } /// /// Event info for LoadPipelineEnding /// public class PluginLoadPipelineEndingEventInfo : PluginEventInfo { } /// /// Event info for PostProcessAppModel /// public class PluginPostProcessAppModelEventInfo : PluginEventInfo { } }