DataAnnotationsModelMetadataProvider 類別

定義

實作 ASP.NET MVC 的預設模型中繼資料提供者。

public class DataAnnotationsModelMetadataProvider : System.Web.Mvc.AssociatedMetadataProvider
type DataAnnotationsModelMetadataProvider = class
    inherit AssociatedMetadataProvider
Public Class DataAnnotationsModelMetadataProvider
Inherits AssociatedMetadataProvider
繼承
DataAnnotationsModelMetadataProvider

建構函式

DataAnnotationsModelMetadataProvider()

初始化 DataAnnotationsModelMetadataProvider 類別的新執行個體。

方法

CreateMetadata(IEnumerable<Attribute>, Type, Func<Object>, Type, String)

取得指定之屬性的中繼資料。

FilterAttributes(Type, PropertyDescriptor, IEnumerable<Attribute>)

取得屬性清單。

(繼承來源 AssociatedMetadataProvider)
GetMetadataForProperties(Object, Type)

傳回模型的屬性清單。

(繼承來源 AssociatedMetadataProvider)
GetMetadataForProperty(Func<Object>, Type, PropertyDescriptor)

使用容器型別和屬性描述元,傳回指定之屬性的中繼資料。

(繼承來源 AssociatedMetadataProvider)
GetMetadataForProperty(Func<Object>, Type, String)

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

(繼承來源 AssociatedMetadataProvider)
GetMetadataForType(Func<Object>, Type)

使用模型型別,傳回指定之屬性的中繼資料。

(繼承來源 AssociatedMetadataProvider)
GetTypeDescriptor(Type)

傳回指定型別的型別描述元。

(繼承來源 AssociatedMetadataProvider)

適用於