ModelAttributes 類別

定義

提供與 、屬性或參數相關聯 Type 之屬性組合清單的存取權。

public ref class ModelAttributes
public class ModelAttributes
type ModelAttributes = class
Public Class ModelAttributes
繼承
ModelAttributes

建構函式

ModelAttributes(IEnumerable<Object>)
已淘汰.

建立 Type 的新 ModelAttributes

ModelAttributes(IEnumerable<Object>, IEnumerable<Object>)
已淘汰.

為屬性建立新的 ModelAttributes

屬性

Attributes

取得所有屬性的集合。 如果這個實例代表屬性的屬性,則屬性定義上的屬性在 屬性的 Type 之前。 如果這個實例代表參數的屬性,則參數定義上的屬性在 參數的 Type 之前。

ParameterAttributes

取得 參數上的屬性集,如果這個實例不代表參數的屬性, null 則為 。

PropertyAttributes

取得 屬性上的屬性集,如果這個實例不代表屬性的屬性, null 則為 。

TypeAttributes

取得 上的 Type 屬性集。 如果這個實例代表屬性,則 TypeAttributes 包含從 PropertyType 擷取的屬性。 如果這個實例代表參數,則包含從 ParameterType 擷取的屬性。

方法

GetAttributesForParameter(ParameterInfo)

取得指定 parameterInfo 之 的屬性。

GetAttributesForParameter(ParameterInfo, Type)

取得具有 parameterInfo 指定 modelType 之 的屬性。

GetAttributesForProperty(Type, PropertyInfo)

取得指定 property 之 的屬性。

GetAttributesForProperty(Type, PropertyInfo, Type)

取得具有 property 指定 modelType 之 的屬性。

GetAttributesForType(Type)

取得指定 type 之 的屬性。

適用於