Struct EnumExtension
- Namespace
- TechnologySolutions.Rfid.AsciiProtocol
- Assembly
- TechnologySolutions.Rfid.AsciiProtocol.Core.dll
Internal class to provide extended functionality to the defined enums
public struct EnumExtension
- Inherited Members
Constructors
EnumExtension(Type, object, string, string)
Initializes a new instance of the ReflectedEnumValue struct
public EnumExtension(Type enumType, object value, string parameter, string description)
Parameters
enumTypeTypeThe type of the Enum
valueobjectThe value of the enum
parameterstringThe value of this enum as a parameter
descriptionstringThe description of this parameter value
Properties
Description
Gets the description of the enum value
public readonly string Description { get; }
Property Value
EnumType
Gets the Type of the enum value
public readonly Type EnumType { get; }
Property Value
Parameter
Gets the parameter string of the enum value
public readonly string Parameter { get; }
Property Value
Value
Gets the value of the enum value
public readonly object Value { get; }
Property Value
Values
Gets all the values of all the enumerations where the values have the EnumExtensionAttribute
public static IEnumerable<EnumExtension> Values { get; }
Property Value
Methods
Extend(Type, bool)
Reflects the EnumExtensionAttribute on each value of an enum to return the parameter and description values
public static IEnumerable<EnumExtension> Extend(Type enumType, bool cache)
Parameters
enumTypeTypeAn Enum where each member has a EnumExtensionAttribute
cacheboolTrue to add the values to the cache of known values
Returns
- IEnumerable<EnumExtension>
The extended properties for the enum