System.Threading.CompressedStack Class

Provides methods for setting and capturing the compressed stack on the current thread. This class cannot be inherited.

See Also: CompressedStack Members


public sealed class CompressedStack : System.Runtime.Serialization.ISerializable


The compressed stack is a compact representation of all the code access security information on the call stack, such as System.Security.CodeAccessPermission.Deny and System.Security.CodeAccessPermission.Assert actions. For example, if a System.Security.CodeAccessPermission.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.

The System.Threading.CompressedStack class is used internally by the System.Security.SecurityContext class. For example, the System.Security.SecurityContext.Capture method captures the compressed stack for the current call stack, along with impersonation and culture information. The System.Security.SecurityContext class is used in turn by the System.Threading.ExecutionContext class to flow context across threads, for example when scheduling thread pool tasks.

This class is not used in ordinary application programming.


Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,