From 3a101d89ea5b83d48bf3ae4795be51f8e4c52990 Mon Sep 17 00:00:00 2001 From: Neil Dorin Date: Fri, 3 Apr 2020 18:01:08 -0600 Subject: [PATCH] Adds some additional help --- .../Devices/EssentialsDevice.cs | 14 ++++++++++++++ .../PepperDash_Essentials_Core.csproj | 1 - .../Plugins/PluginEntrypointAttribute.cs | 19 ------------------- 3 files changed, 14 insertions(+), 20 deletions(-) delete mode 100644 essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs index 7bca06b9..18b187b7 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/EssentialsDevice.cs @@ -34,8 +34,14 @@ namespace PepperDash.Essentials.Core { #region IDeviceFactory Members + /// + /// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device + /// public List TypeNames { get; protected set; } + /// + /// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list + /// public void LoadTypeFactories() { foreach (var typeName in TypeNames) @@ -44,6 +50,11 @@ namespace PepperDash.Essentials.Core } } + /// + /// The method that will build the device + /// + /// The device config + /// An instance of the device public abstract EssentialsDevice BuildDevice(DeviceConfig dc); #endregion @@ -54,6 +65,9 @@ namespace PepperDash.Essentials.Core /// public abstract class EssentialsPluginDeviceFactory : EssentialsDeviceFactory, IPluginDeviceFactory where T : EssentialsDevice { + /// + /// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33") + /// public string MinimumEssentialsFrameworkVersion { get; protected set; } } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index 5e255e82..de778fc5 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -161,7 +161,6 @@ - diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs deleted file mode 100644 index f802211f..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Plugins/PluginEntrypointAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -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; - } - } -} \ No newline at end of file