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

Generate the item list for a "select" element with all items defined in an enum type.
Inheritance: Microsoft.AspNetCore.Razor.TagHelpers.TagHelper
Afficher le fichier Open project: sgjsakura/AspNetCore

Private Properties

Свойство Type Description

Méthodes protégées

Méthode Description
GenerateListForEnumType ( ) : IEnumerable

Generate a list of SelectListItem for a specified enum type.

GetEnumType ( ) : Type

When derived, return the actual enum type for generating the list.

GetItemForMember ( MemberInfo memberInfo ) : SelectListItem

Generate a SelectListItem for a specified MemberInfo.

GetTextForMember ( MemberInfo memberInfo ) : string

Get the text of the option associated with the specified enum item.

GetValueForMember ( MemberInfo memberInfo ) : string

Get the value of the option associated with the specified enum item.

Method Details

GenerateListForEnumType() protected méthode

Generate a list of SelectListItem for a specified enum type.
protected GenerateListForEnumType ( ) : IEnumerable
Résultat IEnumerable

GetEnumType() protected abstract méthode

When derived, return the actual enum type for generating the list.
protected abstract GetEnumType ( ) : Type
Résultat System.Type

GetItemForMember() protected méthode

Generate a SelectListItem for a specified MemberInfo.
protected GetItemForMember ( MemberInfo memberInfo ) : SelectListItem
memberInfo System.Reflection.MemberInfo The object represents as the enum item.
Résultat SelectListItem

GetTextForMember() protected méthode

Get the text of the option associated with the specified enum item.
protected GetTextForMember ( MemberInfo memberInfo ) : string
memberInfo System.Reflection.MemberInfo The object represents as the enum item.
Résultat string

GetValueForMember() protected méthode

Get the value of the option associated with the specified enum item.
protected GetValueForMember ( MemberInfo memberInfo ) : string
memberInfo System.Reflection.MemberInfo The object represents as the enum item.
Résultat string