DataAnnotationsModelMetadata 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 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
容器的型別。
- modelType
- Type
模型的型別。
- propertyName
- String
屬性的名稱。
- displayColumnAttribute
- DisplayColumnAttribute
顯示資料行屬性。