TcpChannel.ChannelName Propriété

Définition

Obtient le nom du canal en cours.

public:
 property System::String ^ ChannelName { System::String ^ get(); };
public string ChannelName { get; }
member this.ChannelName : string
Public ReadOnly Property ChannelName As String

Valeur de propriété

String contenant le nom du canal.

Implémente

Exemples

L’exemple de code suivant montre comment utiliser cette propriété.

// Show the name of the channel.
Console::WriteLine("The name of the channel is {0}.", 
    serverChannel->ChannelName);
// Show the name of the channel.
Console.WriteLine("The name of the channel is {0}.",
    serverChannel.ChannelName);

Remarques

Chaque canal inscrit a un nom unique. Le nom est utilisé pour récupérer un canal spécifique lors de l’appel GetChannelde . Pour définir la ChannelName propriété, affectez la valeur à la propriété indexée « name » dans le dictionnaire passé au TcpChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider) constructeur.

S’applique à