mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Adds some additional help
This commit is contained in:
@@ -34,8 +34,14 @@ namespace PepperDash.Essentials.Core
|
|||||||
{
|
{
|
||||||
#region IDeviceFactory Members
|
#region IDeviceFactory Members
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A list of strings that can be used in the type property of a DeviceConfig object to build an instance of this device
|
||||||
|
/// </summary>
|
||||||
public List<string> TypeNames { get; protected set; }
|
public List<string> TypeNames { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads an item to the DeviceFactory.FactoryMethods dictionary for each entry in the TypeNames list
|
||||||
|
/// </summary>
|
||||||
public void LoadTypeFactories()
|
public void LoadTypeFactories()
|
||||||
{
|
{
|
||||||
foreach (var typeName in TypeNames)
|
foreach (var typeName in TypeNames)
|
||||||
@@ -44,6 +50,11 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The method that will build the device
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dc">The device config</param>
|
||||||
|
/// <returns>An instance of the device</returns>
|
||||||
public abstract EssentialsDevice BuildDevice(DeviceConfig dc);
|
public abstract EssentialsDevice BuildDevice(DeviceConfig dc);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -54,6 +65,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class EssentialsPluginDeviceFactory<T> : EssentialsDeviceFactory<T>, IPluginDeviceFactory where T : EssentialsDevice
|
public abstract class EssentialsPluginDeviceFactory<T> : EssentialsDeviceFactory<T>, IPluginDeviceFactory where T : EssentialsDevice
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Specifies the minimum version of Essentials required for a plugin to run. Must use the format Major.Minor.Build (ex. "1.4.33")
|
||||||
|
/// </summary>
|
||||||
public string MinimumEssentialsFrameworkVersion { get; protected set; }
|
public string MinimumEssentialsFrameworkVersion { get; protected set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,6 @@
|
|||||||
<Compile Include="Plugins\PluginLoader.cs" />
|
<Compile Include="Plugins\PluginLoader.cs" />
|
||||||
<Compile Include="Presets\PresetBase.cs" />
|
<Compile Include="Presets\PresetBase.cs" />
|
||||||
<Compile Include="Plugins\IPluginDeviceFactory.cs" />
|
<Compile Include="Plugins\IPluginDeviceFactory.cs" />
|
||||||
<Compile Include="Plugins\PluginEntrypointAttribute.cs" />
|
|
||||||
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
||||||
<Compile Include="Config\Comm and IR\CommFactory.cs" />
|
<Compile Include="Config\Comm and IR\CommFactory.cs" />
|
||||||
<Compile Include="Config\Comm and IR\CommunicationExtras.cs" />
|
<Compile Include="Config\Comm and IR\CommunicationExtras.cs" />
|
||||||
|
|||||||
@@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user