Class EnumUtilities
Provides utilities for display enums in a human readable form
public static class EnumUtilities
- Inheritance
-
EnumUtilities
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
t
TypeThe 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
T
The 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
value
EnumThe enum value to humanize
Returns
- string
A humanized string describing the given value