using System; using System.Threading.Tasks; using Artemis.Core.Plugins.Models; namespace Artemis.Core.Plugins.Abstract { /// /// /// This is the base plugin type, use the other interfaces such as Module to create plugins /// public abstract class Plugin : IDisposable { internal Plugin(PluginInfo pluginInfo) { PluginInfo = pluginInfo ?? throw new ArgumentNullException(nameof(pluginInfo)); } public PluginInfo PluginInfo { get; internal set; } /// /// Called when the plugin is activated /// public abstract void EnablePlugin(); /// /// Called when the plugin is deactivated /// public abstract void DisablePlugin(); /// /// /// Called when the plugin is unloaded, clean up any unmanaged resources here /// public abstract void Dispose(); } }