IChannelReceiver.StopListening(Object) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menginstruksikan saluran saat ini untuk berhenti mendengarkan permintaan.
public:
void StopListening(System::Object ^ data);
public void StopListening (object data);
[System.Security.SecurityCritical]
public void StopListening (object data);
abstract member StopListening : obj -> unit
[<System.Security.SecurityCritical>]
abstract member StopListening : obj -> unit
Public Sub StopListening (data As Object)
Parameter
- data
- Object
Informasi status opsional untuk saluran.
- Atribut
Pengecualian
Penelepon langsung tidak memiliki izin infrastruktur.
Contoh
// Extract the channel URI and the remote well known object URI from the specified URL.
Console::WriteLine( "Parsed : {0}", myHttpServerChannel->Parse( String::Concat( myHttpServerChannel->GetChannelUri(), "/SayHello" ), myString ) );
Console::WriteLine( "Remote WellKnownObject : {0}", myString );
Console::WriteLine( "Hit <enter> to stop listening..." );
Console::ReadLine();
// Stop listening to channel.
myHttpServerChannel->StopListening( myPort );
// Extract the channel URI and the remote well known object URI from the specified URL.
Console.WriteLine("Parsed : " +
myHttpServerChannel.Parse(myHttpServerChannel.GetChannelUri()+
"/SayHello",out myString));
Console.WriteLine("Remote WellKnownObject : " + myString);
Console.WriteLine("Hit <enter> to stop listening...");
Console.ReadLine();
// Stop listening to channel.
myHttpServerChannel.StopListening((object)myPort);
' Extract the channel URI and the remote well known object URI from the specified URL.
Console.WriteLine("Parsed : " + _
myHttpServerChannel.Parse(myHttpServerChannel.GetChannelUri() + "/SayHello", myString))
Console.WriteLine("Remote WellKnownObject : " + myString)
Console.WriteLine("Hit <enter> to stop listening...")
Console.ReadLine()
' Stop listening to channel.
myHttpServerChannel.StopListening(CType(myPort, Object))
Keterangan
Objek data dapat digunakan untuk meneruskan status tertentu ke saluran.
Berlaku untuk
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.