CustomReflectionContext 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表可自訂的反射情境。
public ref class CustomReflectionContext abstract : System::Reflection::ReflectionContext
public abstract class CustomReflectionContext : System.Reflection.ReflectionContext
type CustomReflectionContext = class
inherit ReflectionContext
Public MustInherit Class CustomReflectionContext
Inherits ReflectionContext
- 繼承
- 衍生
備註
欲了解更多關於此 API 的資訊,請參閱 CustomReflectionContext 的補充 API 備註。
建構函式
| 名稱 | Description |
|---|---|
| CustomReflectionContext() |
初始化 CustomReflectionContext 類別的新執行個體。 |
| CustomReflectionContext(ReflectionContext) |
以指定的反射上下文作為基底,初始化一個新的類別實例 CustomReflectionContext 。 |
方法
| 名稱 | Description |
|---|---|
| AddProperties(Type) |
當在派生類別中覆寫時,會為指定型別提供一組額外的屬性,如本反射語境所示。 |
| CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>, IEnumerable<Attribute>, IEnumerable<Attribute>, IEnumerable<Attribute>) |
建立一個物件,代表一個屬性,需加入到某個型別中,並 AddProperties(Type) 搭配該方法並使用指定的自訂屬性。 |
| CreateProperty(Type, String, Func<Object,Object>, Action<Object,Object>) |
建立一個物件,代表一個屬性,要加入到某個型別中,並搭配該 AddProperties(Type) 方法一起使用。 |
| Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
| GetCustomAttributes(MemberInfo, IEnumerable<Object>) |
當在衍生類別中覆寫時,會提供指定成員的自訂屬性清單,如本反射上下文所示。 |
| GetCustomAttributes(ParameterInfo, IEnumerable<Object>) |
當在衍生類別中覆寫時,會提供指定參數的自訂屬性清單,如同此反思上下文所示。 |
| GetHashCode() |
做為預設哈希函式。 (繼承來源 Object) |
| GetType() |
取得目前實例的 Type。 (繼承來源 Object) |
| GetTypeForObject(Object) |
取得該物體在此反射上下文中類型表示。 (繼承來源 ReflectionContext) |
| MapAssembly(Assembly) |
在此反射語境中,得到由另一個反射語境中物件所表示的組裝體的表示。 |
| MapType(TypeInfo) |
在此反射語境中,得到由另一個反射語境中物件所表示的類型表示。 |
| MemberwiseClone() |
建立目前 Object的淺層複本。 (繼承來源 Object) |
| ToString() |
傳回表示目前 物件的字串。 (繼承來源 Object) |