共用方式為


TcpChannel.ChannelData 屬性

定義

取得通道特定資料。

public:
 property System::Object ^ ChannelData { System::Object ^ get(); };
public object ChannelData { get; }
member this.ChannelData : obj
Public ReadOnly Property ChannelData As 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

適用於