DataAnnotationsModelMetadata 建構函式

定義

初始化 DataAnnotationsModelMetadata 類別的新執行個體。

public:
 DataAnnotationsModelMetadata(System::Web::ModelBinding::DataAnnotationsModelMetadataProvider ^ provider, Type ^ containerType, Func<System::Object ^> ^ modelAccessor, Type ^ modelType, System::String ^ propertyName, System::ComponentModel::DataAnnotations::DisplayColumnAttribute ^ displayColumnAttribute);
public DataAnnotationsModelMetadata(System.Web.ModelBinding.DataAnnotationsModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, System.ComponentModel.DataAnnotations.DisplayColumnAttribute displayColumnAttribute);
new System.Web.ModelBinding.DataAnnotationsModelMetadata : System.Web.ModelBinding.DataAnnotationsModelMetadataProvider * Type * Func<obj> * Type * string * System.ComponentModel.DataAnnotations.DisplayColumnAttribute -> System.Web.ModelBinding.DataAnnotationsModelMetadata
Public Sub New (provider As DataAnnotationsModelMetadataProvider, containerType As Type, modelAccessor As Func(Of Object), modelType As Type, propertyName As String, displayColumnAttribute As DisplayColumnAttribute)

參數

provider
DataAnnotationsModelMetadataProvider

提供者物件。

containerType
Type

容器的種類,或 null 是否沒有容器。

modelAccessor
Func<Object>

模型配件。

modelType
Type

型號的類型。

propertyName
String

物件名稱,或 null 是模型是否為物件。

displayColumnAttribute
DisplayColumnAttribute

顯示欄位屬性。

適用於