Class EnumUtils
Inheritance
System.Object
EnumUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Bayat.Json.Runtime.dll
Syntax
public static class EnumUtils
Methods
|
Improve this Doc
View Source
GetFlagsValues<T>(T)
Declaration
public static IList<T> GetFlagsValues<T>(T value)
where T : struct
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
Type |
Description |
System.Collections.Generic.IList<T> |
|
Type Parameters
|
Improve this Doc
View Source
GetNames(Type)
Declaration
public static IList<string> GetNames(Type enumType)
Parameters
Type |
Name |
Description |
System.Type |
enumType |
|
Returns
Type |
Description |
System.Collections.Generic.IList<System.String> |
|
|
Improve this Doc
View Source
GetNamesAndValues<T>()
Gets a dictionary of the names and values of an Enum type.
Declaration
public static IList<EnumValue<ulong>> GetNamesAndValues<T>()
where T : struct
Returns
Type |
Description |
System.Collections.Generic.IList<EnumValue<System.UInt64>> |
|
Type Parameters
|
Improve this Doc
View Source
GetNamesAndValues<TUnderlyingType>(Type)
Gets a dictionary of the names and values of an Enum type.
Declaration
public static IList<EnumValue<TUnderlyingType>> GetNamesAndValues<TUnderlyingType>(Type enumType)
where TUnderlyingType : struct
Parameters
Type |
Name |
Description |
System.Type |
enumType |
The enum type to get names and values for.
|
Returns
Type |
Description |
System.Collections.Generic.IList<EnumValue<TUnderlyingType>> |
|
Type Parameters
Name |
Description |
TUnderlyingType |
|
|
Improve this Doc
View Source
GetValues(Type)
Declaration
public static IList<object> GetValues(Type enumType)
Parameters
Type |
Name |
Description |
System.Type |
enumType |
|
Returns
Type |
Description |
System.Collections.Generic.IList<System.Object> |
|
|
Improve this Doc
View Source
ParseEnumName(String, Boolean, Type)
Declaration
public static object ParseEnumName(string enumText, bool isNullable, Type t)
Parameters
Type |
Name |
Description |
System.String |
enumText |
|
System.Boolean |
isNullable |
|
System.Type |
t |
|
Returns
Type |
Description |
System.Object |
|
|
Improve this Doc
View Source
ToEnumName(Type, String, Boolean)
Declaration
public static string ToEnumName(Type enumType, string enumText, bool camelCaseText)
Parameters
Type |
Name |
Description |
System.Type |
enumType |
|
System.String |
enumText |
|
System.Boolean |
camelCaseText |
|
Returns
Type |
Description |
System.String |
|