Sdílet prostřednictvím


IpcServerChannel.ChannelData Vlastnost

Definice

Získá data specifická pro kanál.

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

Hodnota vlastnosti

Instance ChannelDataStore , která obsahuje data specifická pro kanál.

Implementuje

Příklady

Následující příklad kódu ukazuje, jak použít ChannelData vlastnost.

// Show the URIs associated with the channel.
System::Runtime::Remoting::Channels::ChannelDataStore^ channelData = 
   static_cast<System::Runtime::Remoting::Channels::ChannelDataStore^>
      (serverChannel->ChannelData);
System::Collections::IEnumerator^ myEnum = channelData->ChannelUris->GetEnumerator();
while ( myEnum->MoveNext() )
{
   String^ uri = safe_cast<String^>( myEnum->Current );
   Console::WriteLine( L"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);
}

Poznámky

Ačkoli je vrácena jako instance System.Object třídy, hodnota této vlastnosti může být přetypován na instanci ChannelDataStore , která popisuje kanál, kterému IpcServerChannel objekt naslouchá.

Platí pro