次の方法で共有


EnumTypeModelBinder クラス

定義

IModelBinder から 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
継承
EnumTypeModelBinder

コンストラクター

EnumTypeModelBinder(Boolean, Type, ILoggerFactory)

EnumTypeModelBinder の新しいインスタンスを初期化します。

メソッド

BindModelAsync(ModelBindingContext)

モデルのバインドを試みます。

(継承元 SimpleTypeModelBinder)
CheckModel(ModelBindingContext, ValueProviderResult, Object)

modelが の場合はnull、 が許可nullされていることを確認します。それ以外の場合は、 に無効な valueProviderResultについて通知しますModelBindingContext.ModelState。 成功した場合、 P:ModelBindingContext.Result を に model 設定します。

適用対象