Plugins: Add IPlugin.OptionsChanged

This commit is contained in:
Katy Coe
2020-12-23 23:54:56 +01:00
parent e1adf20951
commit 62451e5131
9 changed files with 40 additions and 9 deletions

View File

@@ -9,8 +9,20 @@ using System.IO;
using NoisyCowStudios.Bin2Object;
using Il2CppInspector.Reflection;
// Hooks we provide to plugins which can choose whether or not to provide implementations
namespace Il2CppInspector.PluginAPI.V100
{
/// <summary>
/// Executes when the plugin's options are updated by the user
/// Not called on first load (with the default, possibly incomplete options provided by the plugin author)
/// Do not perform any long-running operations here
/// Implementation is optional - the default is to do nothing
/// </summary>
public partial interface IPlugin
{
void OptionsChanged(PluginOptionsChangedEventInfo e) { }
}
/// <summary>
/// Process global-metadata.dat when it is first opened as a sequence of bytes
/// Seek cursor will be at the start of the file

View File

@@ -11,7 +11,7 @@ namespace Il2CppInspector.PluginAPI.V100
/// <summary>
/// Core interface that all plugins must implement
/// </summary>
public interface IPlugin
public partial interface IPlugin
{
/// <summary>
/// Plugin name for CLI and unique ID

View File

@@ -61,6 +61,11 @@ namespace Il2CppInspector.PluginAPI.V100
public bool SkipValidation { get; set; }
}
/// <summary>
/// Event info for OptionsChanged
/// </summary>
public class PluginOptionsChangedEventInfo : PluginEventInfo { }
/// <summary>
/// Event info for PostProcessMetadata
/// </summary>