IpcChannel.ChannelData プロパティ

定義

チャネル固有のデータを取得します。

public:
 property System::Object ^ ChannelData { System::Object ^ get(); };
public object ChannelData { get; }
member this.ChannelData : obj
Public ReadOnly Property ChannelData As Object

プロパティ値

チャネル固有のデータを格納している ChannelDataStore インスタンス。

実装

次のコード例は、ChannelData プロパティの使用方法を示しています。 このコード例は、IpcChannel クラスのために提供されている大規模な例の一部です。

// Show the URIs associated with the channel.
System::Runtime::Remoting::Channels::ChannelDataStore^ channelData = (System::Runtime::Remoting::Channels::ChannelDataStore^)serverChannel->ChannelData;
for each (String^ uri in channelData->ChannelUris)
{
   Console::WriteLine("The channel URI is {0}.", uri);
}
// Show the URIs associated with the channel.
System.Runtime.Remoting.Channels.ChannelDataStore channelData =
    (System.Runtime.Remoting.Channels.ChannelDataStore)
    serverChannel.ChannelData;
foreach (string uri in channelData.ChannelUris)
{
    Console.WriteLine("The channel URI is {0}.", uri);
}

注釈

System.Objectインスタンスとして返されますが、このプロパティの値は、オブジェクトがリッスンするチャネルを記述する の ChannelDataStore インスタンスに HttpServerChannel キャストできます。

適用対象