共用方式為


TcpServerChannel.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 = dynamic_cast<ChannelDataStore^>(serverChannel->ChannelData);
System::Collections::IEnumerator^ myEnum = data->ChannelUris->GetEnumerator();
while ( myEnum->MoveNext() )
{
   String^ uri = safe_cast<String^>(myEnum->Current);
   Console::WriteLine( uri );
}
// Show the URIs associated with the channel.
ChannelDataStore data = (ChannelDataStore) serverChannel.ChannelData;
foreach (string uri in data.ChannelUris)
{
    Console.WriteLine(uri);
}

備註

雖然 傳回做為 的System.Object實例,但這個屬性的值可以轉換成 描述物件接聽之通道的TcpServerChannel實例ChannelDataStore

適用於