TcpChannel.ChannelData 属性

定义

获取信道特定数据。

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

属性值

Object

包含特定于信道的数据的 ChannelDataStore 实例。

实现

示例

下面的代码示例演示如何使用此属性。

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

注解

虽然作为实例System.Object返回,但此属性的值可以强制转换为描述HttpServerChannel对象侦听通道的实例ChannelDataStore

适用于