IChannelReceiver.StopListening(Object) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Commande au canal en cours d'arrêter l'écoute des demandes.
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)
Paramètres
- data
- Object
Informations d'état facultatives pour le canal.
- Attributs
Exceptions
L'appelant immédiat n'a pas d'autorisation d'accès à l'infrastructure.
Exemples
// 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))
Remarques
L’objet de données peut être utilisé pour passer l’état spécifique au canal.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour