Share via


TcpChannel.ChannelName プロパティ

定義

現在のチャネルの名前を取得します。

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

プロパティ値

チャネルの名前を格納する String

実装

次のコード例は、このプロパティの使用方法を示しています。

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

注釈

登録されているすべてのチャネルには一意の名前があります。 名前は、 を呼び出 GetChannelすときに特定のチャネルを取得するために使用されます。 プロパティを ChannelName 設定するには、コンストラクターに渡されるディクショナリ内の "name" インデックス付きプロパティに値を TcpChannel(IDictionary, IClientChannelSinkProvider, IServerChannelSinkProvider) 割り当てます。

適用対象