style: switch to auto property for attributes

This commit is contained in:
Andrew Welker
2025-07-25 09:56:39 -05:00
parent 58bcc3315d
commit 4fc6ecbd0b
2 changed files with 4 additions and 16 deletions

View File

@@ -8,26 +8,20 @@ namespace PepperDash.Essentials.Core
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
public class ConfigSnippetAttribute : Attribute
{
private string _ConfigSnippet;
/// <summary>
/// Represents a configuration snippet for the device.
/// </summary>
/// <param name="configSnippet"></param>
public ConfigSnippetAttribute(string configSnippet)
{
//Debug.LogMessage(LogEventLevel.Verbose, "Setting Config Snippet {0}", configSnippet);
_ConfigSnippet = configSnippet;
ConfigSnippet = configSnippet;
}
/// <summary>
/// Gets the configuration snippet for the device.
/// This snippet can be used in the DeviceConfig to instantiate the device.
/// </summary>
public string ConfigSnippet
{
get { return _ConfigSnippet; }
}
public string ConfigSnippet { get; }
}
}

View File

@@ -8,25 +8,19 @@ namespace PepperDash.Essentials.Core
[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;
Description = description;
}
/// <summary>
/// Gets the description for the device.
/// </summary>
public string Description
{
get { return _Description; }
}
public string Description { get; }
}
}