IClientChannelSink.GetRequestStream(IMessage, ITransportHeaders) Method

Definition

Returns the Stream onto which the provided message is to be serialized.

public System.IO.Stream GetRequestStream (System.Runtime.Remoting.Messaging.IMessage msg, System.Runtime.Remoting.Channels.ITransportHeaders headers);
[System.Security.SecurityCritical]
public System.IO.Stream GetRequestStream (System.Runtime.Remoting.Messaging.IMessage msg, System.Runtime.Remoting.Channels.ITransportHeaders headers);

Parameters

msg
IMessage

The IMethodCallMessage containing details about the method call.

headers
ITransportHeaders

The headers to add to the outgoing message heading to the server.

Returns

The Stream onto which the provided message is to be serialized.

Attributes

Exceptions

The immediate caller does not have infrastructure permission.

Examples

The following code example illustrates an implementation of this method.

public Stream GetRequestStream (IMessage message, ITransportHeaders requestHeaders)
{
    // Get the request stream from the next sink in the chain.
    return( nextSink.GetRequestStream(message, requestHeaders) );
}

Remarks

The GetRequestStream method is called by the formatter sink before it serializes the message.

Applies to

מוצר גירסאות
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also