Add EnumerationIconAttribute for associating enums with font-awesome icons
This commit is contained in:
parent
38e72d2f6f
commit
2b30a8b5e9
1 changed files with 17 additions and 0 deletions
17
CapyKit/Attributes/EnumerationIconAttribute.cs
Normal file
17
CapyKit/Attributes/EnumerationIconAttribute.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue