MaxLengthAttributeAdapter 构造函数

定义

初始化 MaxLengthAttributeAdapter 类的新实例。

public:
 MaxLengthAttributeAdapter(System::Web::ModelBinding::ModelMetadata ^ metadata, System::Web::ModelBinding::ModelBindingExecutionContext ^ context, System::ComponentModel::DataAnnotations::MaxLengthAttribute ^ attribute);
public MaxLengthAttributeAdapter (System.Web.ModelBinding.ModelMetadata metadata, System.Web.ModelBinding.ModelBindingExecutionContext context, System.ComponentModel.DataAnnotations.MaxLengthAttribute attribute);
new System.Web.ModelBinding.MaxLengthAttributeAdapter : System.Web.ModelBinding.ModelMetadata * System.Web.ModelBinding.ModelBindingExecutionContext * System.ComponentModel.DataAnnotations.MaxLengthAttribute -> System.Web.ModelBinding.MaxLengthAttributeAdapter
Public Sub New (metadata As ModelMetadata, context As ModelBindingExecutionContext, attribute As MaxLengthAttribute)

参数

metadata
ModelMetadata

指定模型的元数据容器。

context
ModelBindingExecutionContext

指定模型绑定系统外所有信息的容器。

attribute
MaxLengthAttribute

指定属性中允许的数组或字符串数据的最大长度。

适用于