System.Runtime.Remoting.Messaging.LogicalCallContext Class

Assembly: Mscorlib.dll
Namespace: System.Runtime.Remoting.Messaging
Summary
Provides a set of properties that are carried with the execution code path during remote method calls.
C# Syntax:
[Serializable]
public sealed class LogicalCallContext : ISerializable, ICloneable
Remarks
The LogicalCallContext class is a version of the CallContext class that is used during method calls to remote application domains. The 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 CallContext as it travels down and 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 CallContext class generates a LogicalCallContext that travels along with the remote call. Only objects that expose the ILogicalThreadAffinative interface and are stored in the CallContext are propagated outside the AppDomain in a LogicalCallContext. Objects that do not support this interface are not transmitted in LogicalCallContext instances with remote method calls.

See also:
System.Runtime.Remoting.Messaging Namespace

System.Runtime.Remoting.Messaging.LogicalCallContext Member List:

Public Properties
HasInfo Read-only

Gets a value indicating whether the current LogicalCallContext contains information.
Public Methods
Clone Creates a new object that is a copy of the current instance.
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
FreeNamedDataSlot Empties a data slot with the specified name.
GetData Retrieves an object associated with the specified name from the current instance.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetObjectData Populates a specified SerializationInfo with the data needed to serialize the current LogicalCallContext.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
SetData Stores the specified object in the current instance, and associates it with the specified name.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Runtime.Remoting.Messaging.LogicalCallContext Member Details

Property: HasInfo (read-only)
Summary
Gets a value indicating whether the current LogicalCallContext contains information.
C# Syntax:
public bool HasInfo {get;}

Return to top


Method: Clone()
Summary
Creates a new object that is a copy of the current instance.
C# Syntax:
public object Clone();
Return Value:
A new object that is a copy of this instance.
Implements:
ICloneable.Clone
Remarks
The LogicalCallContext.Clone method produces a deep copy of the current LogicalCallContext.

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~LogicalCallContext();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: FreeNamedDataSlot(
   string name
)
Summary
Empties a data slot with the specified name.
C# Syntax:
public void FreeNamedDataSlot(
   string name
);
Parameters:

name

The name of the data slot to empty.

Return to top


Method: GetData(
   string name
)
Summary
Retrieves an object associated with the specified name from the current instance.
C# Syntax:
public object GetData(
   string name
);
Parameters:

name

The name of the item in the call context.

Return Value:
The object in the logical call context associated with the specified name.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetObjectData(
   SerializationInfo info,
   StreamingContext context
)
Summary
Populates a specified SerializationInfo with the data needed to serialize the current LogicalCallContext.
C# Syntax:
public void GetObjectData(
   SerializationInfo info,
   StreamingContext context
);
Parameters:

info

The SerializationInfo to populate with data.

context

The contextual information about the source or destination of the serialization.

Exceptions
Exception Type Condition
ArgumentNullException info is null.
Implements:
ISerializable.GetObjectData
Remarks
The current method fills the provided SerializationInfo with all the data needed to recreate the LogicalCallContext.

The current method is an implementation of ISerializable.GetObjectData.

See also:
ISerializable

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: SetData(
   string name,
   object data
)
Summary
Stores the specified object in the current instance, and associates it with the specified name.
C# Syntax:
public void SetData(
   string name,
   object data
);
Parameters:

name

The name with which to associate the new item in the call context.

data

The object to store in the call context.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.