Bagikan melalui


TcpServerChannel.ChannelData Properti

Definisi

Mendapatkan data khusus saluran.

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

Nilai Properti

ChannelDataStore Instans yang berisi data khusus saluran.

Penerapan

Contoh

Contoh kode berikut menunjukkan penggunaan properti ini.

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

Keterangan

Meskipun dikembalikan sebagai instans System.Object, nilai properti ini dapat ditransmisikan ke instans ChannelDataStore yang menjelaskan saluran yang didengarkan TcpServerChannel objek.

Berlaku untuk