mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
Added plugin entrypoint attribute and interface
This commit is contained in:
parent
8a09ffa7e4
commit
ee26e77f15
2 changed files with 29 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
using PepperDash.Core;
|
||||
using PepperDash.Essentials.Core.Config;
|
||||
|
||||
namespace PepperDash.Essentials.Core.Plugins
|
||||
{
|
||||
public interface IPluginDeviceConfig
|
||||
{
|
||||
IKeyed BuildDevice(DeviceConfig dc);
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue