CompressedStack CompressedStack CompressedStack CompressedStack Class

定義

提供用來在目前執行緒上設定及擷取壓縮堆疊的方法。Provides methods for setting and capturing the compressed stack on the current thread. 這個類別無法被繼承。This class cannot be inherited.

public ref class CompressedStack sealed : System::Runtime::Serialization::ISerializable
[System.Serializable]
public sealed class CompressedStack : System.Runtime.Serialization.ISerializable
type CompressedStack = class
    interface ISerializable
Public NotInheritable Class CompressedStack
Implements ISerializable
繼承
CompressedStackCompressedStackCompressedStackCompressedStack
屬性
實作

備註

壓縮的堆疊是精簡的方式的 所有程式碼存取安全性資訊在呼叫堆疊上,例如DenyAssert動作。The compressed stack is a compact representation of all the code access security information on the call stack, such as Deny and Assert actions. 例如,如果Deny的動作是兩個堆疊框架從目前的框架有其他的程式碼存取安全性註釋有之間和目前的框架,壓縮的堆疊會記錄該資訊,而不需要序列化整個呼叫堆疊。For example, if a Deny action is two stack frames up from the current frame and there are no other code access security annotations between there and the current frame, the compressed stack records only that information, without having to serialize the entire call stack.

CompressedStack類別會在內部使用SecurityContext類別。The CompressedStack class is used internally by the SecurityContext class. 比方說,SecurityContext.Capture方法會擷取目前的呼叫堆疊,以及模擬和文化特性資訊的壓縮的堆疊。For example, the SecurityContext.Capture method captures the compressed stack for the current call stack, along with impersonation and culture information. SecurityContext類別會使用依次ExecutionContext至多個執行緒,例如在排程執行緒集區的工作流程內容類別。The SecurityContext class is used in turn by the ExecutionContext class to flow context across threads, for example when scheduling thread pool tasks.

這個類別不用於一般的應用程式的程式設計。This class is not used in ordinary application programming.

方法

Capture() Capture() Capture() Capture()

從目前的執行緒擷取壓縮堆疊。Captures the compressed stack from the current thread.

CreateCopy() CreateCopy() CreateCopy() CreateCopy()

建立目前壓縮堆疊的複本。Creates a copy of the current compressed stack.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

將目前執行個體所持有的資源釋出。Releases the resources held by the current instance.

GetCompressedStack() GetCompressedStack() GetCompressedStack() GetCompressedStack()

取得目前執行緒的壓縮堆疊。Gets the compressed stack for the current thread.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext) GetObjectData(SerializationInfo, StreamingContext)

將具有邏輯內容資訊的 SerializationInfo 物件,設定為需要重新建立此執行內容的執行個體。Sets the SerializationInfo object with the logical context information needed to recreate an instance of this execution context.

GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
Run(CompressedStack, ContextCallback, Object) Run(CompressedStack, ContextCallback, Object) Run(CompressedStack, ContextCallback, Object) Run(CompressedStack, ContextCallback, Object)

在目前執行緒上的指定壓縮堆疊中執行方法。Runs a method in the specified compressed stack on the current thread.

ToString() ToString() ToString() ToString()

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

(Inherited from Object)

適用於