Class CodeEnum<TEnum, TCode>
- Namespace
- PushTechnology.DiffusionCore
- Assembly
- Diffusion.Client.dll
Abstract class for extending enums including converting codes to enum constants.
[Obsolete("Since 5.9. This will be removed in a future version of the product.", false)]
public abstract class CodeEnum<TEnum, TCode> : AdvancedEnum<TEnum> where TEnum : CodeEnum<TEnum, TCode>
Type Parameters
TEnumThe enum constant.
TCodeThe byte representation of the enum.
- Inheritance
-
AdvancedEnum<TEnum>CodeEnum<TEnum, TCode>
- Derived
- Inherited Members
Properties
Code
Returns the byte representation of the enum constant.
public TCode Code { get; protected set; }
Property Value
- TCode
The byte representation of the enum constant.
Enum
Returns the enum.
public TEnum Enum { get; protected set; }
Property Value
- TEnum
The enum.
Methods
FromCode(TCode)
Returns the constant associated with the given code.
public static TEnum FromCode(TCode code)
Parameters
codeTCodeThe byte representation of the enum constant.
Returns
- TEnum
The constant associated with the given code.