Add EnumerationIconAttribute for associating enums with font-awesome icons

This commit is contained in:
Jordan Wages 2026-07-22 23:50:37 -05:00
commit 2b30a8b5e9

View file

@ -0,0 +1,17 @@
namespace CapyKit.Attributes;
/// <summary> Attribute describing the associated font-awesome icon of an <see cref="Enum"/> parameter. </summary>
[AttributeUsage(AttributeTargets.Field)]
public class EnumerationIconAttribute : Attribute
{
/// <summary> Gets or sets the description of the enumeration. </summary>
/// <value> The description. </value>
public string Icon { get; private set; }
/// <summary> Constructor. </summary>
/// <param name="icon"> The icon associated with the enumeration. </param>
public EnumerationIconAttribute(string icon)
{
this.Icon = icon;
}
}