Class EnumUtilities
Provides utilities for display enums in a human readable form
public static class EnumUtilities
- Inheritance
-
objectEnumUtilities
Methods
GetAllValuesAndDescriptions(Type)
Creates a list containing a tuple for each value in the enum type
public static List<(Enum, string)> GetAllValuesAndDescriptions(Type t)
Parameters
tTypeThe enum type to create value descriptions for
Returns
GetAllValuesAndDescriptions<T>()
Creates a list containing a tuple for each value in the enum type
public static List<(T, string)> GetAllValuesAndDescriptions<T>() where T : struct, Enum
Returns
Type Parameters
TThe enum type to create value descriptions for
HumanizeValue(Enum)
Humanizes the given enum value using the Humanizer library
public static string HumanizeValue(Enum value)
Parameters
valueEnumThe enum value to humanize
Returns
- string
A humanized string describing the given value