Class EnumConverter<T>
Provides customizable enumeration string conversion functionality. All operations are thread-safe.
Inherited Members
Namespace: Singulink.Enums
Assembly: Singulink.Enums.dll
Syntax
public sealed class EnumConverter<T> where T : unmanaged, Enum
Type Parameters
Name | Description |
---|---|
T |
Constructors
Name | Description |
---|---|
EnumConverter(EnumConvertOptions) | Initializes a new instance of the EnumConverter<T> class. |
EnumConverter(Action<EnumConvertOptions>) | Initializes a new instance of the EnumConverter<T> class. |
Properties
Name | Description |
---|---|
Default | Gets the default case-sensitive enumeration converter. |
DefaultIgnoreCase | Gets the default case-insensitive enumeration converter. |
Methods
Name | Description |
---|---|
AsString(T) | Gets a string representation of the specified enumeration value. |
AsString(T, SplitFlagsOptions) | Gets a string representation of the specified enumeration value using the specified options to customize how flags are split. |
GetName(T) | Gets the first enumeration name with the given value. |
GetValue(string) | Gets the enumeration value with the given name. |
Parse(string) | Gets the enumeration value parsed from the specified string. |
TryGetName(T, out string?) | Gets the first enumeration name with the given value. |
TryGetValue(string, out T) | Gets the enumeration value with the given name. |
TryParse(string, out T) | Gets the enumeration value parsed from the specified string. |