共用方式為


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

屬性的名稱。

傳回

使用容器型別和屬性名稱指定之屬性的中繼資料。

適用於