mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-05 07:45:05 +00:00
Attempt at modifying device factory mechanism
This commit is contained in:
@@ -1,15 +1,28 @@
|
||||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Plugins
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines a class that is capable of loading custom plugin device types
|
||||
/// </summary>
|
||||
public interface IPluginDeviceConfig
|
||||
public interface IPluginDeviceFactory : IDeviceFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Required to define the minimum version for Essentials in the format xx.yy.zz
|
||||
/// </summary>
|
||||
string MinimumEssentialsFrameworkVersion { get; }
|
||||
void LoadPlugin();
|
||||
IKeyed BuildDevice(DeviceConfig dc);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines a class that is capable of loading device types
|
||||
/// </summary>
|
||||
public interface IDeviceFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Will be called when the plugin is loaded by Essentials. Must add any new types to the DeviceFactory using DeviceFactory.AddFactoryForType() for each new type
|
||||
/// </summary>
|
||||
void LoadTypeFactories();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user