BinaryFormatter.DeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage) Method

Definition

将对远程方法调用的响应从所提供的 Stream 进行反序列化。Deserializes a response to a remote method call from the provided Stream.

public:
 System::Object ^ DeserializeMethodResponse(System::IO::Stream ^ serializationStream, System::Runtime::Remoting::Messaging::HeaderHandler ^ handler, System::Runtime::Remoting::Messaging::IMethodCallMessage ^ methodCallMessage);
public object DeserializeMethodResponse (System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler handler, System.Runtime.Remoting.Messaging.IMethodCallMessage methodCallMessage);
member this.DeserializeMethodResponse : System.IO.Stream * System.Runtime.Remoting.Messaging.HeaderHandler * System.Runtime.Remoting.Messaging.IMethodCallMessage -> obj
Public Function DeserializeMethodResponse (serializationStream As Stream, handler As HeaderHandler, methodCallMessage As IMethodCallMessage) As Object

Parameters

serializationStream
Stream

要从其中反序列化对象图形的流。The stream from which to deserialize the object graph.

handler
HeaderHandler

处理 serializationStream 中的任何标题的 HeaderHandlerThe HeaderHandler that handles any headers in the serializationStream. 可以为 nullCan be null.

methodCallMessage
IMethodCallMessage

IMethodCallMessage 包含有关调用出处的详细信息。The IMethodCallMessage that contains details about where the call came from.

Returns

Object

对远程方法调用的反序列化响应。The deserialized response to the remote method call.

Exceptions

serializationStreamnullThe serializationStream is null.

serializationStream 支持查找,但其长度为 0。The serializationStream supports seeking, but its length is 0.

调用方没有所要求的权限。The caller does not have the required permission.

Remarks

在方法调用期间,不会将有关调用方对象的详细信息发送到远程对象。Details about the caller object are not sent to the remote object during the method call. 而是从原始方法调用获取这些详细信息,该方法调用将传递到 methodCallMessage 参数中的当前方法。Instead, these details are obtained from the original method call that is passed to the current method in the methodCallMessage parameter.

为了成功进行反序列化,流中的当前位置必须位于对象图的开头。In order for deserialization to succeed the current position in the stream must be at the beginning of the object graph.

Applies to