mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Attempt at modifying device factory mechanism
This commit is contained in:
parent
ca27e01f94
commit
a403a8b81f
7 changed files with 120 additions and 12 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue