Changed plugins to abstract classes

This commit is contained in:
SpoinkyNL committed 2019-04-16 00:24:50 +02:00
1 parent c9277ecc4e
commit f63a7b91c8
36 files changed
+657 -300

No files matched your search

@@ -0,0 +1,35 @@
using System;
using Artemis.Core.Plugins.Models;
namespace Artemis.Core.Plugins.Abstract
{
/// <inheritdoc />
/// <summary>
/// This is the base plugin type, use the other interfaces such as Module to create plugins
/// </summary>
public abstract class Plugin : IDisposable
{
internal Plugin(PluginInfo pluginInfo)
{
PluginInfo = pluginInfo;
}
public PluginInfo PluginInfo { get; internal set; }
/// <summary>
/// Called when the plugin is activated
/// </summary>
public abstract void EnablePlugin();
/// <summary>
/// Called when the plugin is deactivated
/// </summary>
public abstract void DisablePlugin();
/// <inheritdoc />
/// <summary>
/// Called when the plugin is unloaded, clean up any unmanaged resources here
/// </summary>
public abstract void Dispose();
}
}