Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Class HelperEnum

Inheritance

↳ object

    HelperEnum

Inherited Members

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

MemberwiseClone()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Helpers

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public static class HelperEnum

Methods

IsEnumType<TEnum>()

Declaration
public static bool IsEnumType<TEnum>() where TEnum : struct
Returns
TypeDescription
bool

IsEnumType(Type)

Declaration
public static bool IsEnumType(Type enumType)
Parameters
TypeNameDescription
TypeenumType
Returns
TypeDescription
bool

Contains<TEnum>(string, bool)

Declaration
public static bool Contains<TEnum>(string value, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
stringvalue
boolExeption
Returns
TypeDescription
bool

Contains(Type, string, bool)

Declaration
public static bool Contains(Type enumType, string value, bool Exeption = true)
Parameters
TypeNameDescription
TypeenumType
stringvalue
boolExeption
Returns
TypeDescription
bool

GetName<TEnum>(TEnum)

Declaration
public static string GetName<TEnum>(TEnum value) where TEnum : struct
Parameters
TypeNameDescription
{TEnum}value
Returns
TypeDescription
string

GetName<TEnum>(Type, TEnum)

Declaration
public static string GetName<TEnum>(Type enumType, TEnum value) where TEnum : struct
Parameters
TypeNameDescription
TypeenumType
{TEnum}value
Returns
TypeDescription
string

Name(Enum)

Declaration
public static string Name(this Enum enumType)
Parameters
TypeNameDescription
EnumenumType
Returns
TypeDescription
string

UpperName(Enum)

Declaration
public static string UpperName(this Enum enumType)
Parameters
TypeNameDescription
EnumenumType
Returns
TypeDescription
string

GetNames<TEnum>(bool)

Declaration
public static List<string> GetNames<TEnum>(bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
boolExeption
Returns
TypeDescription
List<string>

GetNames(Type, bool)

Declaration
public static List<string> GetNames(Type enumType, bool Exeption = true)
Parameters
TypeNameDescription
TypeenumType
boolExeption
Returns
TypeDescription
List<string>

GetNames<TEnum>(List<TEnum>, bool)

Declaration
public static List<string> GetNames<TEnum>(List<TEnum> enumValues, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
List<TEnum>enumValues
boolExeption
Returns
TypeDescription
List<string>

GetValues<TEnum>(bool)

Declaration
public static List<TEnum> GetValues<TEnum>(bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
boolExeption
Returns
TypeDescription
List<TEnum>

GetValues<TEnum>(Type, bool)

Declaration
public static List<TEnum> GetValues<TEnum>(Type enumType, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
TypeenumType
boolExeption
Returns
TypeDescription
List<TEnum>

GetValuesWithoutDefault<TEnum>(bool, TEnum)

Declaration
public static List<TEnum> GetValuesWithoutDefault<TEnum>(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct
Parameters
TypeNameDescription
boolExeption
{TEnum}defaultValue
Returns
TypeDescription
List<TEnum>

ValidateEnumInDictionary<TEnum, TValue>(IDictionary<TEnum, TValue>, bool, out List<string>)

Declaration
public static bool ValidateEnumInDictionary<TEnum, TValue>(IDictionary<TEnum, TValue> dictionary, bool withExceptions, out List<string> notExists) where TEnum : struct
Parameters
TypeNameDescription
IDictionary<TEnum, TValue>dictionary
boolwithExceptions
List<string>notExists
Returns
TypeDescription
bool

GetValuesWithout<TEnum>(List<TEnum>, bool, bool)

Declaration
public static List<TEnum> GetValuesWithout<TEnum>(List<TEnum> excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
List<TEnum>excludedElements
boolwithoutDefault
boolExeption
Returns
TypeDescription
List<TEnum>

GetNamesWithout<TEnum>(List<TEnum>, bool, bool)

Declaration
public static List<string> GetNamesWithout<TEnum>(List<TEnum> excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
List<TEnum>excludedElements
boolwithoutDefault
boolExeption
Returns
TypeDescription
List<string>

GetNamesWithoutDefault<TEnum>(bool, TEnum)

Declaration
public static List<string> GetNamesWithoutDefault<TEnum>(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct
Parameters
TypeNameDescription
boolExeption
{TEnum}defaultValue
Returns
TypeDescription
List<string>

GetValue<TEnum>(string, bool, bool)

Declaration
public static TEnum GetValue<TEnum>(string value, bool ignoreCase = true, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
stringvalue
boolignoreCase
boolExeption
Returns
TypeDescription
{TEnum}

TryGetValue<TEnum>(string, out TEnum, bool, bool)

Declaration
public static bool TryGetValue<TEnum>(string value, out TEnum result, bool ignoreCase = true, bool Exeption = true) where TEnum : struct
Parameters
TypeNameDescription
stringvalue
{TEnum}result
boolignoreCase
boolExeption
Returns
TypeDescription
bool

ToDropdownList<TEnum>(bool, TEnum)

Declaration
public static List<DropdownValue> ToDropdownList<TEnum>(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct
Parameters
TypeNameDescription
boolwithoutDefault
{TEnum}defaultValue
Returns
TypeDescription
List<DropdownValue>

ToDropdownListWithout<TEnum>(List<TEnum>, bool)

Declaration
public static List<DropdownValue> ToDropdownListWithout<TEnum>(List<TEnum> values, bool withoutDefault) where TEnum : struct
Parameters
TypeNameDescription
List<TEnum>values
boolwithoutDefault
Returns
TypeDescription
List<DropdownValue>

ToDropdownList<TEnum>(List<TEnum>, bool, TEnum)

Declaration
public static List<DropdownValue> ToDropdownList<TEnum>(List<TEnum> excludedElements, bool withoutDefault, TEnum defaultValue = default) where TEnum : struct
Parameters
TypeNameDescription
List<TEnum>excludedElements
boolwithoutDefault
{TEnum}defaultValue
Returns
TypeDescription
List<DropdownValue>

ToDictionary<TEnum>(bool, TEnum)

Declaration
public static Dictionary<string, TEnum> ToDictionary<TEnum>(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct
Parameters
TypeNameDescription
boolwithoutDefault
{TEnum}defaultValue
Returns
TypeDescription
Dictionary<string, TEnum>

GetDescription<TEnum>(TEnum)

Declaration
public static string GetDescription<TEnum>(TEnum value) where TEnum : struct
Parameters
TypeNameDescription
{TEnum}value
Returns
TypeDescription
string

Description(Enum)

Declaration
public static string Description(this Enum enumType)
Parameters
TypeNameDescription
EnumenumType
Returns
TypeDescription
string