Table of Contents

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 Type

The type of the Enum

value object

The value of the enum

parameter string

The value of this enum as a parameter

description string

The description of this parameter value

Properties

Description

Gets the description of the enum value

public string Description { get; }

Property Value

string

EnumType

Gets the Type of the enum value

public Type EnumType { get; }

Property Value

Type

Parameter

Gets the parameter string of the enum value

public string Parameter { get; }

Property Value

string

Value

Gets the value of the enum value

public object Value { get; }

Property Value

object

Values

Gets all the values of all the enumerations where the values have the EnumExtensionAttribute

public static IEnumerable<EnumExtension> Values { get; }

Property Value

IEnumerable<EnumExtension>

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 Type

An Enum where each member has a EnumExtensionAttribute

cache bool

True to add the values to the cache of known values

Returns

IEnumerable<EnumExtension>

The extended properties for the enum