Added plugin entrypoint attribute and interface

This commit is contained in:
bitm0de
2020-02-15 14:28:41 -07:00
parent 8a09ffa7e4
commit ee26e77f15
2 changed files with 29 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
using PepperDash.Core;
using PepperDash.Essentials.Core.Config;
namespace PepperDash.Essentials.Core.Plugins
{
public interface IPluginDeviceConfig
{
IKeyed BuildDevice(DeviceConfig dc);
}
}

View File

@@ -0,0 +1,19 @@
using System;
namespace PepperDash.Essentials.Core.Plugins
{
[AttributeUsage(AttributeTargets.Class)]
public sealed class PluginEntryPointAttribute : Attribute
{
private readonly string _uniqueKey;
public string UniqueKey {
get { return _uniqueKey; }
}
public PluginEntryPointAttribute(string key)
{
_uniqueKey = key;
}
}
}