ModelValidator(ModelMetadata, ModelBindingExecutionContext) 构造函数

定义

初始化 ModelValidator 类的新实例。

protected:
 ModelValidator(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ modelBindingExecutionContext);
protected ModelValidator (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext modelBindingExecutionContext);
new System.Web.ModelBinding.ModelValidator : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext -> System.Web.ModelBinding.ModelValidator
Protected Sub New (metadata As ModelMetadata, modelBindingExecutionContext As ModelBindingExecutionContext)

参数

metadata
ModelMetadata

元数据。

modelBindingExecutionContext
ModelBindingExecutionContext

该执行上下文。

例外

metadatamodelBindingExecutionContext 参数为 null

适用于