Table of Contents

Class EnumUtilities

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

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 Type

The enum type to create value descriptions for

Returns

List<(Enum, string)>

A list containing a value-description tuple for each value in the enum type

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

List<(T, string)>

A list containing a value-description tuple for each value in the enum type

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 Enum

The enum value to humanize

Returns

string

A humanized string describing the given value