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
Syntaxpublic static class HelperEnum
Methods
IsEnumType<TEnum>()
Declarationpublic static bool IsEnumType<TEnum>() where TEnum : struct
Type | Description |
---|---|
bool |
IsEnumType(Type)
Declarationpublic static bool IsEnumType(Type enumType)
Type | Name | Description |
---|---|---|
Type | enumType |
Type | Description |
---|---|
bool |
Contains<TEnum>(string, bool)
Declarationpublic static bool Contains<TEnum>(string value, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
string | value | |
bool | Exeption |
Type | Description |
---|---|
bool |
Contains(Type, string, bool)
Declarationpublic static bool Contains(Type enumType, string value, bool Exeption = true)
Type | Name | Description |
---|---|---|
Type | enumType | |
string | value | |
bool | Exeption |
Type | Description |
---|---|
bool |
GetName<TEnum>(TEnum)
Declarationpublic static string GetName<TEnum>(TEnum value) where TEnum : struct
Type | Name | Description |
---|---|---|
{TEnum} | value |
Type | Description |
---|---|
string |
GetName<TEnum>(Type, TEnum)
Declarationpublic static string GetName<TEnum>(Type enumType, TEnum value) where TEnum : struct
Type | Name | Description |
---|---|---|
Type | enumType | |
{TEnum} | value |
Type | Description |
---|---|
string |
Name(Enum)
Declarationpublic static string Name(this Enum enumType)
Type | Name | Description |
---|---|---|
Enum | enumType |
Type | Description |
---|---|
string |
UpperName(Enum)
Declarationpublic static string UpperName(this Enum enumType)
Type | Name | Description |
---|---|---|
Enum | enumType |
Type | Description |
---|---|
string |
GetNames<TEnum>(bool)
Declarationpublic static List<string> GetNames<TEnum>(bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
bool | Exeption |
Type | Description |
---|---|
List<string> |
GetNames(Type, bool)
Declarationpublic static List<string> GetNames(Type enumType, bool Exeption = true)
Type | Name | Description |
---|---|---|
Type | enumType | |
bool | Exeption |
Type | Description |
---|---|
List<string> |
GetNames<TEnum>(List<TEnum>, bool)
Declarationpublic static List<string> GetNames<TEnum>(List<TEnum> enumValues, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
List<TEnum> | enumValues | |
bool | Exeption |
Type | Description |
---|---|
List<string> |
GetValues<TEnum>(bool)
Declarationpublic static List<TEnum> GetValues<TEnum>(bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
bool | Exeption |
Type | Description |
---|---|
List<TEnum> |
GetValues<TEnum>(Type, bool)
Declarationpublic static List<TEnum> GetValues<TEnum>(Type enumType, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
Type | enumType | |
bool | Exeption |
Type | Description |
---|---|
List<TEnum> |
GetValuesWithoutDefault<TEnum>(bool, TEnum)
Declarationpublic static List<TEnum> GetValuesWithoutDefault<TEnum>(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct
Type | Name | Description |
---|---|---|
bool | Exeption | |
{TEnum} | defaultValue |
Type | Description |
---|---|
List<TEnum> |
ValidateEnumInDictionary<TEnum, TValue>(IDictionary<TEnum, TValue>, bool, out List<string>)
Declarationpublic static bool ValidateEnumInDictionary<TEnum, TValue>(IDictionary<TEnum, TValue> dictionary, bool withExceptions, out List<string> notExists) where TEnum : struct
Type | Name | Description |
---|---|---|
IDictionary<TEnum, TValue> | dictionary | |
bool | withExceptions | |
List<string> | notExists |
Type | Description |
---|---|
bool |
GetValuesWithout<TEnum>(List<TEnum>, bool, bool)
Declarationpublic static List<TEnum> GetValuesWithout<TEnum>(List<TEnum> excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
List<TEnum> | excludedElements | |
bool | withoutDefault | |
bool | Exeption |
Type | Description |
---|---|
List<TEnum> |
GetNamesWithout<TEnum>(List<TEnum>, bool, bool)
Declarationpublic static List<string> GetNamesWithout<TEnum>(List<TEnum> excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
List<TEnum> | excludedElements | |
bool | withoutDefault | |
bool | Exeption |
Type | Description |
---|---|
List<string> |
GetNamesWithoutDefault<TEnum>(bool, TEnum)
Declarationpublic static List<string> GetNamesWithoutDefault<TEnum>(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct
Type | Name | Description |
---|---|---|
bool | Exeption | |
{TEnum} | defaultValue |
Type | Description |
---|---|
List<string> |
GetValue<TEnum>(string, bool, bool)
Declarationpublic static TEnum GetValue<TEnum>(string value, bool ignoreCase = true, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
string | value | |
bool | ignoreCase | |
bool | Exeption |
Type | Description |
---|---|
{TEnum} |
TryGetValue<TEnum>(string, out TEnum, bool, bool)
Declarationpublic static bool TryGetValue<TEnum>(string value, out TEnum result, bool ignoreCase = true, bool Exeption = true) where TEnum : struct
Type | Name | Description |
---|---|---|
string | value | |
{TEnum} | result | |
bool | ignoreCase | |
bool | Exeption |
Type | Description |
---|---|
bool |
ToDropdownList<TEnum>(bool, TEnum)
Declarationpublic static List<DropdownValue> ToDropdownList<TEnum>(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct
Type | Name | Description |
---|---|---|
bool | withoutDefault | |
{TEnum} | defaultValue |
Type | Description |
---|---|
List<DropdownValue> |
ToDropdownListWithout<TEnum>(List<TEnum>, bool)
Declarationpublic static List<DropdownValue> ToDropdownListWithout<TEnum>(List<TEnum> values, bool withoutDefault) where TEnum : struct
Type | Name | Description |
---|---|---|
List<TEnum> | values | |
bool | withoutDefault |
Type | Description |
---|---|
List<DropdownValue> |
ToDropdownList<TEnum>(List<TEnum>, bool, TEnum)
Declarationpublic static List<DropdownValue> ToDropdownList<TEnum>(List<TEnum> excludedElements, bool withoutDefault, TEnum defaultValue = default) where TEnum : struct
Type | Name | Description |
---|---|---|
List<TEnum> | excludedElements | |
bool | withoutDefault | |
{TEnum} | defaultValue |
Type | Description |
---|---|
List<DropdownValue> |
ToDictionary<TEnum>(bool, TEnum)
Declarationpublic static Dictionary<string, TEnum> ToDictionary<TEnum>(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct
Type | Name | Description |
---|---|---|
bool | withoutDefault | |
{TEnum} | defaultValue |
Type | Description |
---|---|
Dictionary<string, TEnum> |
GetDescription<TEnum>(TEnum)
Declarationpublic static string GetDescription<TEnum>(TEnum value) where TEnum : struct
Type | Name | Description |
---|---|---|
{TEnum} | value |
Type | Description |
---|---|
string |
Description(Enum)
Declarationpublic static string Description(this Enum enumType)
Type | Name | Description |
---|---|---|
Enum | enumType |
Type | Description |
---|---|
string |