C# Class Sakura.AspNetCore.Mvc.TagHelpers.EnumHelper

Mostrar archivo Open project: sgjsakura/AspNetCore

Public Methods

Method Description
GetMember ( this obj ) : FieldInfo

Get the FieldInfo definition for an enum value object.

GetTextForMember ( this memberInfo, EnumOptionTextSource textSource ) : string

Get the display text of an enum item from the specified text source.

GetValueForMember ( this memberInfo, EnumOptionValueSource valueSource ) : string

Get the value text of an enum item from the specified value source.

Method Details

GetMember() public static method

Get the FieldInfo definition for an enum value object.
public static GetMember ( this obj ) : FieldInfo
obj this The enum value object.
return System.Reflection.FieldInfo

GetTextForMember() public static method

Get the display text of an enum item from the specified text source.
The value of is not a valid enum item.
public static GetTextForMember ( this memberInfo, EnumOptionTextSource textSource ) : string
memberInfo this The object represented as an enum item.
textSource EnumOptionTextSource The text source for the enum item.
return string

GetValueForMember() public static method

Get the value text of an enum item from the specified value source.
The value of is not a valid enum item.
public static GetValueForMember ( this memberInfo, EnumOptionValueSource valueSource ) : string
memberInfo this The object represented as an enum item.
valueSource EnumOptionValueSource The value source for the enum item.
return string