ReflectionContext 類別

定義

表示可提供代表可提供反映物件的內容。Represents a context that can provide reflection objects.

public ref class ReflectionContext abstract
public abstract class ReflectionContext
type ReflectionContext = class
Public MustInherit Class ReflectionContext
繼承
ReflectionContext
衍生

備註

這個類別的目的是要提供一種方法, 讓反映程式碼在反映物件源自預設反映內容以外的內容時感知, 讓那些物件上的作業可以使用該內容。The purpose of this class is to provide a way for reflection code to be made aware when reflection objects originate in a context other than the default reflection context, so that operations on those objects can use that context. 例如, 源自CustomReflectionContext物件的反映物件, 應該只與具有相同來源的反映物件進行比較。For example, reflection objects that originate with a CustomReflectionContext object should be compared only with reflection objects that have the same origin. 如需詳細資訊,請參閱 CustomReflectionContext 參考頁面。For more information, see the CustomReflectionContext reference page.

建構函式

ReflectionContext()

初始化 ReflectionContext 類別的新執行個體。Initializes a new instance of the ReflectionContext class.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
GetTypeForObject(Object)

取得此反映內容中指定之物件的型別表示。Gets the representation of the type of the specified object in this reflection context.

MapAssembly(Assembly)

取得此反射內容中由來自另一個反射內容的物件所代表的表示。Gets the representation, in this reflection context, of an assembly that is represented by an object from another reflection context.

MapType(TypeInfo)

取得此反射內容中由來自另一個反射內容的物件所代表的型別表示。Gets the representation, in this reflection context, of a type represented by an object from another reflection context.

MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於