Class EnumExtensions
Class EnumExtensions.
Inheritance
System.Object
EnumExtensions
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public static class EnumExtensions : object
Methods
EnumAsKeyValuePair(Type, Func<String, String>)
Converts Enum to IEnumerable of Value/Text.
Declaration
public static IEnumerable<object> EnumAsKeyValuePair(Type enumType, Func<string, string> translationFunction = null)
Parameters
Type | Name | Description |
---|---|---|
Type | enumType | |
Func<System.String, System.String> | translationFunction |
Returns
Type | Description |
---|---|
IEnumerable<System.Object> |
GetAutoCompleteValue(AutoCompleteType)
Converts the autocomplete type enum value to the expected autocomplete attribute value.
Declaration
public static string GetAutoCompleteValue(this AutoCompleteType typeValue)
Parameters
Type | Name | Description |
---|---|---|
AutoCompleteType | typeValue |
Returns
Type | Description |
---|---|
System.String | The autocomplete attribute string value. |
GetDisplayDescription(Enum, Func<String, String>)
Gets enum description.
Declaration
public static string GetDisplayDescription(this Enum enumValue, Func<string, string> translationFunction = null)
Parameters
Type | Name | Description |
---|---|---|
Enum | enumValue | |
Func<System.String, System.String> | translationFunction |
Returns
Type | Description |
---|---|
System.String |