DataAnnotationsModelValidator<TAttribute> 构造函数

定义

初始化 DataAnnotationsModelValidator<TAttribute> 类的新实例。

public:
 DataAnnotationsModelValidator(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context, TAttribute attribute);
public DataAnnotationsModelValidator (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context, TAttribute attribute);
new System.Web.ModelBinding.DataAnnotationsModelValidator<'Attribute (requires 'Attribute :> System.ComponentModel.DataAnnotations.ValidationAttribute)> : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext * 'Attribute -> System.Web.ModelBinding.DataAnnotationsModelValidator<'Attribute (requires 'Attribute :> System.ComponentModel.DataAnnotations.ValidationAttribute)>
Public Sub New (metadata As ModelMetadata, context As ModelBindingExecutionContext, attribute As TAttribute)

参数

metadata
ModelMetadata

元数据。

context
ModelBindingExecutionContext

该执行上下文。

attribute
TAttribute

验证特性。

适用于