CachedAssociatedMetadataProvider<TModelMetadata>.GetMetadataForProperty 方法

定义

重载

GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)

返回指定属性的元数据。

protected override sealed 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 Overrides NotOverridable 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 sealed 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 NotOverridable Function GetMetadataForProperty (modelAccessor As Func(Of Object), containerType As Type, propertyName As String) As ModelMetadata

参数

modelAccessor
Func<Object>

模型访问器。

containerType
Type

容器类型。

propertyName
String

属性名称。

返回

指定的属性的元数据。

适用于