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

显示列特性。

适用于