共用方式為


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

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

適用於