共用方式為


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

適用於