DataAnnotationsModelMetadata 建構函式

定義

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

public DataAnnotationsModelMetadata (System.Web.Mvc.DataAnnotationsModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName, System.ComponentModel.DataAnnotations.DisplayColumnAttribute displayColumnAttribute);
new System.Web.Mvc.DataAnnotationsModelMetadata : System.Web.Mvc.DataAnnotationsModelMetadataProvider * Type * Func<obj> * Type * string * System.ComponentModel.DataAnnotations.DisplayColumnAttribute -> System.Web.Mvc.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

容器的型別。

modelAccessor
Func<Object>

模型存取子。

modelType
Type

模型的型別。

propertyName
String

屬性的名稱。

displayColumnAttribute
DisplayColumnAttribute

顯示資料行屬性。

適用於