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
enumType
TypeThe type of the Enum
value
objectThe value of the enum
parameter
stringThe value of this enum as a parameter
description
stringThe description of this parameter value
Properties
Description
Gets the description of the enum value
public string Description { get; }
Property Value
EnumType
Gets the Type of the enum value
public Type EnumType { get; }
Property Value
Parameter
Gets the parameter string of the enum value
public string Parameter { get; }
Property Value
Value
Gets the value of the enum value
public 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
enumType
TypeAn Enum where each member has a EnumExtensionAttribute
cache
boolTrue to add the values to the cache of known values
Returns
- IEnumerable<EnumExtension>
The extended properties for the enum