Bagikan melalui


IClientChannelSink.GetRequestStream(IMessage, ITransportHeaders) Metode

Definisi

Mengembalikan ke Stream tempat pesan yang disediakan akan diserialisasikan.

public:
 System::IO::Stream ^ GetRequestStream(System::Runtime::Remoting::Messaging::IMessage ^ msg, System::Runtime::Remoting::Channels::ITransportHeaders ^ headers);
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);
abstract member GetRequestStream : System.Runtime.Remoting.Messaging.IMessage * System.Runtime.Remoting.Channels.ITransportHeaders -> System.IO.Stream
[<System.Security.SecurityCritical>]
abstract member GetRequestStream : System.Runtime.Remoting.Messaging.IMessage * System.Runtime.Remoting.Channels.ITransportHeaders -> System.IO.Stream
Public Function GetRequestStream (msg As IMessage, headers As ITransportHeaders) As Stream

Parameter

msg
IMessage

Detail IMethodCallMessage yang berisi tentang panggilan metode.

headers
ITransportHeaders

Header yang akan ditambahkan ke judul pesan keluar ke server.

Mengembalikan

Tempat Stream pesan yang disediakan akan diserialisasikan.

Atribut

Pengecualian

Pemanggil langsung tidak memiliki izin infrastruktur.

Contoh

Contoh kode berikut mengilustrasikan implementasi metode ini.

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

Keterangan

Metode GetRequestStream ini dipanggil oleh sink pemformat sebelum menserialisasikan pesan.

Berlaku untuk

Lihat juga