Condividi tramite


IChannelReceiver.StopListening(Object) Metodo

Definizione

Indica al canale corrente di interrompere l'attesa di richieste.

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)

Parametri

data
Object

Informazioni di stato facoltative per il canale.

Attributi

Eccezioni

Il chiamante immediato non dispone dell'autorizzazione di infrastruttura.

Esempio

// 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))

Commenti

L'oggetto dati può essere usato per passare lo stato specifico al canale.

Si applica a