Udostępnij za pośrednictwem


TcpChannel.ChannelData Właściwość

Definicja

Pobiera dane specyficzne dla kanału.

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

Wartość właściwości

ChannelDataStore Wystąpienie zawierające dane specyficzne dla kanału.

Implementuje

Przykłady

W poniższym przykładzie kodu pokazano, jak używać tej właściwości.

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

Uwagi

Chociaż zwracane jako wystąpienie obiektu System.Object, wartość tej właściwości można rzutować do wystąpienia ChannelDataStore opisującego kanał, do którego HttpServerChannel nasłuchuje obiekt.

Dotyczy