Sdílet prostřednictvím


EnumTypeModelBinder Třída

Definice

IModelBinder implementace pro vazbu modelů pro typy odvozené z Enum.

public ref class EnumTypeModelBinder : Microsoft::AspNetCore::Mvc::ModelBinding::Binders::SimpleTypeModelBinder
public class EnumTypeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinder
type EnumTypeModelBinder = class
    inherit SimpleTypeModelBinder
Public Class EnumTypeModelBinder
Inherits SimpleTypeModelBinder
Dědičnost
EnumTypeModelBinder

Konstruktory

EnumTypeModelBinder(Boolean, Type, ILoggerFactory)

Inicializuje novou instanci objektu EnumTypeModelBinder.

Metody

BindModelAsync(ModelBindingContext)

Pokusí se vytvořit vazbu modelu.

(Zděděno od SimpleTypeModelBinder)
CheckModel(ModelBindingContext, ValueProviderResult, Object)

Pokud je modelnull, ověří, že je povoleno být null, jinak upozorní na ModelBindingContext.ModelState neplatný valueProviderResult. Nastaví P:ModelBindingContext.Result na model hodnotu v případě úspěchu.

Platí pro