System.Runtime.Remoting.Messaging.CallContext Class

Provides a set of properties that are carried with the execution code path. This class cannot be inherited.

See Also: CallContext Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public sealed class CallContext

Remarks

System.Runtime.Remoting.Messaging.CallContext is a specialized collection object similar to a Thread Local Storage for method calls and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the System.Runtime.Remoting.Messaging.CallContext as it travels down and back up the execution code path, and examined by various objects along the path.

When a remote method call is made to an object in another AppDomain, the System.Runtime.Remoting.Messaging.CallContext class generates a System.Runtime.Remoting.Messaging.LogicalCallContext instance that travels along with the remote call. Only objects that expose the System.Runtime.Remoting.Messaging.ILogicalThreadAffinative interface and are stored in the System.Runtime.Remoting.Messaging.CallContext are propagated outside the AppDomain in a System.Runtime.Remoting.Messaging.LogicalCallContext. Objects that do not support this interface are not transmitted in System.Runtime.Remoting.Messaging.LogicalCallContext instances with remote method calls.

Note:

All methods in System.Runtime.Remoting.Messaging.CallContext are static and operate on the call context in the current System.Threading.Thread.

Note:

This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [<topic://cpconLinkDemands>] for more information.

Requirements

Namespace: System.Runtime.Remoting.Messaging
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0