mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
This commit introduces significant updates to the device factory system, enhancing the way devices are created and managed within the PepperDash Essentials framework. The changes include: - New attributes for device configuration and description. - Refactoring of the device manager and essentials device classes to support new factory methods. - modified factory classes for essentials devices, plugin development devices, and processor extension devices. - The device factory interface has been updated to include a factory method for creating devices. - Added a wrapper for the device factory to streamline device creation. - Updated plugin loader to accommodate the new device factory structure. Fixes #1065 Fixed #1277
32 lines
802 B
C#
32 lines
802 B
C#
using System;
|
|
|
|
namespace PepperDash.Essentials.Core
|
|
{
|
|
/// <summary>
|
|
/// Represents a description attribute for a device.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
|
|
public class DescriptionAttribute : Attribute
|
|
{
|
|
private string _Description;
|
|
|
|
/// <summary>
|
|
/// Represents a description attribute for a device.
|
|
/// </summary>
|
|
/// <param name="description"></param>
|
|
public DescriptionAttribute(string description)
|
|
{
|
|
//Debug.LogMessage(LogEventLevel.Verbose, "Setting Description: {0}", description);
|
|
_Description = description;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the description for the device.
|
|
/// </summary>
|
|
public string Description
|
|
{
|
|
get { return _Description; }
|
|
}
|
|
}
|
|
|
|
} |