System.Runtime.Remoting.Messaging Namespace

The System.Runtime.Remoting.Messaging namespace contains classes used to create and transmit messages. The remoting infrastructure uses messages to communicate with remote objects. Messages are used to transmit remote method calls, to activate remote objects, and to communicate information. A message object carries a set of named properties, including action identifiers, envoy information, and parameters. Some of the most important classes of the System.Runtime.Remoting.Messaging namespace are the System.Runtime.Remoting.Messaging.AsyncResult class, the System.Runtime.Remoting.Messaging.RemotingSurrogateSelector class, and the System.Runtime.Remoting.Messaging.ReturnMessage class.

Remarks

The System.Runtime.Remoting.Messaging.AsyncResult class stores and returns the results of an asynchronous method call. System.Runtime.Remoting.Messaging.AsyncResult instances contain the return value, call status, the delegate used for the call, and the other information about the asynchronous method call.

The System.Runtime.Remoting.Messaging.RemotingSurrogateSelector class can be used to control serialization of objects that extend MarshalByRefObject. A System.Runtime.Remoting.Messaging.RemotingSurrogateSelector selects the surrogate used in serialization and deserialization of such objects. A surrogate is an object that can control serialization or deserialization of an object.

The System.Runtime.Remoting.Messaging.ReturnMessage class holds information returned after a remote method call. A System.Runtime.Remoting.Messaging.ReturnMessage holds the return value and any out or ref parameters that resulted from the remote method call.

Classes

TypeReason
AsyncResult

Encapsulates the results of an asynchronous operation on a delegate.

CallContext

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

ConstructionCall

Implements the System.Runtime.Remoting.Activation.IConstructionCallMessage interface to create a request message that constitutes a constructor call on a remote object.

ConstructionResponse

Implements the System.Runtime.Remoting.Activation.IConstructionReturnMessage interface to create a message that responds to a call to instantiate a remote object.

Header

Defines the out-of-band data for a call.

HeaderHandler

Represents the method that will handle processing of headers on the stream during deserialization.

ILogicalThreadAffinative

Marks an object that can propagate outside of an AppDomain in a System.Runtime.Remoting.Messaging.LogicalCallContext.

IMessage

Contains communication data sent between cooperating message sinks.

IMessageCtrl

Provides a way to control asynchronous messages after they have dispatched using the System.Runtime.Remoting.Messaging.IMessageSink.AsyncProcessMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessageSink).

IMessageSink

Defines the interface for a message sink.

IMethodCallMessage

Defines the method call message interface.

IMethodMessage

Defines the method message interface.

IMethodReturnMessage

Defines the method call return message interface.

InternalMessageWrapper

Wraps remoting data for passing between message sinks, either for requests from client to server or for the subsequent responses.

IRemotingFormatter

Provides the remote procedure call (RPC) interface for all formatters.

LogicalCallContext

Provides a set of properties that are carried with the execution code path during remote method calls.

MessageSurrogateFilter

Determines whether the System.Runtime.Remoting.Messaging.RemotingSurrogateSelector class should ignore a particular System.Runtime.Remoting.Messaging.IMessage property while creating an System.Runtime.Remoting.ObjRef for a MarshalByRefObject class.

MethodCall

Implements the System.Runtime.Remoting.Messaging.IMethodCallMessage interface to create a request message that acts as a method call on a remote object.

MethodCallMessageWrapper

Implements the System.Runtime.Remoting.Messaging.IMethodCallMessage interface to create a request message that acts as a method call on a remote object.

MethodResponse

Implements the System.Runtime.Remoting.Messaging.IMethodReturnMessage interface to create a message that acts as a method response on a remote object.

MethodReturnMessageWrapper

Implements the System.Runtime.Remoting.Messaging.IMethodReturnMessage interface to create a message that acts as a response to a method call on a remote object.

OneWayAttribute

Marks a method as one way, without a return value and out or ref parameters.

RemotingSurrogateSelector

Selects the remoting surrogate that can be used to serialize an object that derives from a MarshalByRefObject.

ReturnMessage

Holds a message returned in response to a method call on a remote object.