Udostępnij za pośrednictwem


IpcChannel.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ć ChannelData właściwości. Ten przykład kodu jest częścią większego przykładu podanego IpcChannel dla klasy.

// Show the URIs associated with the channel.
System::Runtime::Remoting::Channels::ChannelDataStore^ channelData = (System::Runtime::Remoting::Channels::ChannelDataStore^)serverChannel->ChannelData;
for each (String^ uri in channelData->ChannelUris)
{
   Console::WriteLine("The channel URI is {0}.", uri);
}
// Show the URIs associated with the channel.
System.Runtime.Remoting.Channels.ChannelDataStore channelData =
    (System.Runtime.Remoting.Channels.ChannelDataStore)
    serverChannel.ChannelData;
foreach (string uri in channelData.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