System.Runtime.Remoting.Messaging Namespace

System.Runtime.Remoting.Messaging 命名空间包含用于创建和传输消息的类。 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. System.Runtime.Remoting.Messaging 命名空间的一些最重要的类是 AsyncResult 类、RemotingSurrogateSelector 类和 ReturnMessage 类。 Some of the most important classes of the System.Runtime.Remoting.Messaging namespace are the AsyncResult class, the RemotingSurrogateSelector class, and the ReturnMessage class.

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 IConstructionCallMessage interface to create a request message that constitutes a constructor call on a remote object.Implements the IConstructionCallMessage interface to create a request message that constitutes a constructor call on a remote object.

ConstructionResponse

实现 IConstructionReturnMessage 接口以创建一个消息,该消息对实例化远程对象的调用做出响应。Implements the 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.

InternalMessageWrapper

包装在消息接收器之间传递的远程处理数据,或者用于从客户端到服务器的请求,或者用于后续的响应。Wraps remoting data for passing between message sinks, either for requests from client to server or for the subsequent responses.

LogicalCallContext

提供在进行远程方法调用期间用执行代码路径传送的一组属性。Provides a set of properties that are carried with the execution code path during remote method calls.

MethodCall

实现 IMethodCallMessage 接口来创建一个请求消息,该消息作为远程对象上的方法调用。Implements the IMethodCallMessage interface to create a request message that acts as a method call on a remote object.

MethodCallMessageWrapper

实现 IMethodCallMessage 接口来创建一个请求消息,该消息作为远程对象上的方法调用。Implements the IMethodCallMessage interface to create a request message that acts as a method call on a remote object.

MethodResponse

实现 IMethodReturnMessage 接口来创建一条消息,该消息作为远程对象上的方法响应。Implements the IMethodReturnMessage interface to create a message that acts as a method response on a remote object.

MethodReturnMessageWrapper

实现 IMethodReturnMessage 接口以创建一条消息,该消息作为远程对象上的方法调用的响应。Implements the IMethodReturnMessage interface to create a message that acts as a response to a method call on a remote object.

OneWayAttribute

将方法标记为单向方法,无返回值和 outref 参数。Marks a method as one way, without a return value and out or ref parameters.

RemotingSurrogateSelector

选择可用于序列化从 MarshalByRefObject 派生的对象的远程处理代理项。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.

接口

ILogicalThreadAffinative

标记可以在 AppDomain 中传播到 LogicalCallContext 外部的对象。Marks an object that can propagate outside of an AppDomain in a LogicalCallContext.

IMessage

包含在合作的消息接收器之间发送的通讯数据。Contains communication data sent between cooperating message sinks.

IMessageCtrl

提供一种方法,以在使用 AsyncProcessMessage(IMessage, IMessageSink) 调度异步消息后控制这些消息。Provides a way to control asynchronous messages after they have dispatched using the AsyncProcessMessage(IMessage, 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.

IRemotingFormatter

提供所有格式化程序的远程过程调用 (RPC) 接口。Provides the remote procedure call (RPC) interface for all formatters.

委托

HeaderHandler

表示将在反序列化期间处理流上的标头的方法。Represents the method that will handle processing of headers on the stream during deserialization.

MessageSurrogateFilter

确定在为 RemotingSurrogateSelector 类创建 IMessage 时,ObjRef 类是否忽略某个特定的 MarshalByRefObject 属性。Determines whether the RemotingSurrogateSelector class should ignore a particular IMessage property while creating an ObjRef for a MarshalByRefObject class.

注解

AsyncResult类存储,并返回异步方法调用的结果。The AsyncResult class stores and returns the results of an asynchronous method call. AsyncResult 实例包含return值、 调用状态,用于调用和异步方法调用的其他信息的委托。AsyncResult instances contain the return value, call status, the delegate used for the call, and the other information about the asynchronous method call.

RemotingSurrogateSelector类可用于控制序列化的对象的扩展MarshalByRefObjectThe RemotingSurrogateSelector class can be used to control serialization of objects that extend MarshalByRefObject. 一个RemotingSurrogateSelector选择序列化和反序列化此类对象中使用的代理项。A 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.

ReturnMessage类保留远程方法调用后返回的信息。The ReturnMessage class holds information returned after a remote method call. 一个ReturnMessage持有return值和任何outref源自远程方法调用的参数。A ReturnMessage holds the return value and any out or ref parameters that resulted from the remote method call.