using System;
namespace Chernobyl.Plugin
{
///
/// Provides an interface through which plug-ins can be added to the Chernobyl framework. Plugins
/// should derive from if they wish to be disposed of on application
/// shutdown or unloading of the plugin.
///
public interface IPlugin
{}
///
/// Wraps an instance to make it a plugin. This is useful when you have a type that you want to
/// treat as a plugin, such as when using dependency injection, but don't want to create an
/// additional plugin type for it.
///
/// The instance being
public class Plugin : IPlugin
{
/// The instance to treat as a plugin.
public Plugin(T instance)
{
Instance = instance;
}
///
/// The instance to treat as a plugin.
///
public T Instance { get; }
}
}