AssociatedMetadataProvider.GetMetadataForProperty 方法

定义

重载

GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)

使用容器类型和属性说明符返回指定属性的元数据。

GetMetadataForProperty(Func<Object>, Type, String)

使用容器类型和属性名称返回指定属性的元数据。

GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)

使用容器类型和属性说明符返回指定属性的元数据。

protected virtual System.Web.Mvc.ModelMetadata GetMetadataForProperty (Func<object> modelAccessor, Type containerType, System.ComponentModel.PropertyDescriptor propertyDescriptor);
override this.GetMetadataForProperty : Func<obj> * Type * System.ComponentModel.PropertyDescriptor -> System.Web.Mvc.ModelMetadata
Protected Overridable Function GetMetadataForProperty (modelAccessor As Func(Of Object), containerType As Type, propertyDescriptor As PropertyDescriptor) As ModelMetadata

参数

modelAccessor
Func<Object>

模型访问器。

containerType
Type

容器的类型。

propertyDescriptor
PropertyDescriptor

属性说明符

返回

使用容器类型和属性说明符返回的指定属性的元数据。

适用于

GetMetadataForProperty(Func<Object>, Type, String)

使用容器类型和属性名称返回指定属性的元数据。

public override System.Web.Mvc.ModelMetadata GetMetadataForProperty (Func<object> modelAccessor, Type containerType, string propertyName);
override this.GetMetadataForProperty : Func<obj> * Type * string -> System.Web.Mvc.ModelMetadata
Public Overrides Function GetMetadataForProperty (modelAccessor As Func(Of Object), containerType As Type, propertyName As String) As ModelMetadata

参数

modelAccessor
Func<Object>

模型访问器。

containerType
Type

容器的类型。

propertyName
String

属性的名称。

返回

使用容器类型和属性名称返回的指定属性的元数据。

适用于