AssociatedMetadataProvider.GetMetadataForProperty 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
參數
- 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
參數
- containerType
- Type
容器的型別。
- propertyName
- String
屬性的名稱。
傳回
使用容器型別和屬性名稱指定之屬性的中繼資料。