Rediger

Del via


TcpServerChannel.ChannelData Property

Definition

Gets channel-specific data.

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

Property Value

A ChannelDataStore instance containing channel-specific data.

Implements

Examples

The following code example shows the use of this property.

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

Remarks

Although returned as an instance of System.Object, the value of this property can be cast to an instance of ChannelDataStore describing the channel to which the TcpServerChannel object listens.

Applies to