Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class HelperEnum

OptimaJet.Workflow.Core.Helpers.HelperEnum

public static class HelperEnum

Inheritance

  • System.Object

Methods

public static bool IsEnumType<TEnum>() where TEnum : struct #

Returns

Type
Description
Boolean
public static bool IsEnumType(Type enumType) #

Parameters

Name
Type
Description
enumType
Type

Returns

Type
Description
Boolean
public static bool Contains<TEnum>(string value, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
value
String
Exeption
Boolean

Returns

Type
Description
Boolean
public static bool Contains(Type enumType, string value, bool Exeption = true) #

Parameters

Name
Type
Description
enumType
Type
value
String
Exeption
Boolean

Returns

Type
Description
Boolean
public static string GetName<TEnum>(TEnum value) where TEnum : struct #

Parameters

Name
Type
Description
value
{TEnum}

Returns

Type
Description
String
public static string GetName<TEnum>(Type enumType, TEnum value) where TEnum : struct #

Parameters

Name
Type
Description
enumType
Type
value
{TEnum}

Returns

Type
Description
String
public static string Name(this Enum enumType) #

Parameters

Name
Type
Description
enumType
Enum

Returns

Type
Description
String
public static string UpperName(this Enum enumType) #

Parameters

Name
Type
Description
enumType
Enum

Returns

Type
Description
String
public static List<string> GetNames<TEnum>(bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
Exeption
Boolean

Returns

Type
Description
List<String>
public static List<string> GetNames(Type enumType, bool Exeption = true) #

Parameters

Name
Type
Description
enumType
Type
Exeption
Boolean

Returns

Type
Description
List<String>
public static List<string> GetNames<TEnum>(List<TEnum> enumValues, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
enumValues
List<TEnum>
Exeption
Boolean

Returns

Type
Description
List<String>
public static List<TEnum> GetValues<TEnum>(bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
Exeption
Boolean

Returns

Type
Description
List<TEnum>
public static List<TEnum> GetValues<TEnum>(Type enumType, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
enumType
Type
Exeption
Boolean

Returns

Type
Description
List<TEnum>
public static List<TEnum> GetValuesWithoutDefault<TEnum>(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct #

Parameters

Name
Type
Description
Exeption
Boolean
defaultValue
{TEnum}

Returns

Type
Description
List<TEnum>
public static bool ValidateEnumInDictionary<TEnum, TValue>(IDictionary<TEnum, TValue> dictionary, bool withExceptions, out List<string> notExists) where TEnum : struct #

Parameters

Name
Type
Description
dictionary
IDictionary<{TEnum},{TValue>
withExceptions
Boolean
notExists
List<String>

Returns

Type
Description
Boolean
public static List<TEnum> GetValuesWithout<TEnum>(List<TEnum> excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
excludedElements
List<TEnum>
withoutDefault
Boolean
Exeption
Boolean

Returns

Type
Description
List<TEnum>
public static List<string> GetNamesWithout<TEnum>(List<TEnum> excludedElements, bool withoutDefault, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
excludedElements
List<TEnum>
withoutDefault
Boolean
Exeption
Boolean

Returns

Type
Description
List<String>
public static List<string> GetNamesWithoutDefault<TEnum>(bool Exeption = true, TEnum defaultValue = default) where TEnum : struct #

Parameters

Name
Type
Description
Exeption
Boolean
defaultValue
{TEnum}

Returns

Type
Description
List<String>
public static TEnum GetValue<TEnum>(string value, bool ignoreCase = true, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
value
String
ignoreCase
Boolean
Exeption
Boolean

Returns

Type
Description
{TEnum}
public static bool TryGetValue<TEnum>(string value, out TEnum result, bool ignoreCase = true, bool Exeption = true) where TEnum : struct #

Parameters

Name
Type
Description
value
String
result
{TEnum}
ignoreCase
Boolean
Exeption
Boolean

Returns

Type
Description
Boolean
public static List<DropdownValue> ToDropdownList<TEnum>(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct #

Parameters

Name
Type
Description
withoutDefault
Boolean
defaultValue
{TEnum}

Returns

Type
Description
List<DropdownValue>
public static List<DropdownValue> ToDropdownListWithout<TEnum>(List<TEnum> values, bool withoutDefault) where TEnum : struct #

Parameters

Name
Type
Description
values
List<TEnum>
withoutDefault
Boolean

Returns

Type
Description
List<DropdownValue>
public static List<DropdownValue> ToDropdownList<TEnum>(List<TEnum> excludedElements, bool withoutDefault, TEnum defaultValue = default) where TEnum : struct #

Parameters

Name
Type
Description
excludedElements
List<TEnum>
withoutDefault
Boolean
defaultValue
{TEnum}

Returns

Type
Description
List<DropdownValue>
public static Dictionary<string, TEnum> ToDictionary<TEnum>(bool withoutDefault, TEnum defaultValue = default) where TEnum : struct #

Parameters

Name
Type
Description
withoutDefault
Boolean
defaultValue
{TEnum}

Returns

Type
Description
Dictionary<String,{TEnum>
public static string GetDescription<TEnum>(TEnum value) where TEnum : struct #

Parameters

Name
Type
Description
value
{TEnum}

Returns

Type
Description
String
public static string Description(this Enum enumType) #

Parameters

Name
Type
Description
enumType
Enum

Returns

Type
Description
String