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

指定屬性允許的最大陣列或字串資料長度。

適用於