SimpleTypeModelBinder 类

定义

简单 IModelBinder 类型的 。

public ref class SimpleTypeModelBinder : Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder
public class SimpleTypeModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
type SimpleTypeModelBinder = class
    interface IModelBinder
Public Class SimpleTypeModelBinder
Implements IModelBinder
继承
SimpleTypeModelBinder
派生
实现

构造函数

SimpleTypeModelBinder(Type)
已过时.

此构造函数已过时,将在将来的版本中删除。 建议的替代方法是重载,该重载也采用 ILoggerFactory

初始化 SimpleTypeModelBinder 的新实例。

SimpleTypeModelBinder(Type, ILoggerFactory)

初始化 SimpleTypeModelBinder 的新实例。

方法

BindModelAsync(ModelBindingContext)

尝试绑定模型。

CheckModel(ModelBindingContext, ValueProviderResult, Object)

如果 为 modelnull,则验证是否允许 null为 ,否则会通知 ModelBindingContext.ModelState 有关无效 valueProviderResult的 。 如果成功,将 P:ModelBindingContext.Result 设置为 model

适用于