Compartilhar via


TcpServerChannel.ChannelData Propriedade

Definição

Obtém dados específicos do canal.

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

Valor da propriedade

Uma ChannelDataStore instância que contém dados específicos do canal.

Implementações

Exemplos

O exemplo de código a seguir mostra o uso dessa propriedade.

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

Comentários

Embora retornado como uma instância de System.Object, o valor dessa propriedade pode ser convertido em uma instância de descrevendo ChannelDataStore o canal ao qual o TcpServerChannel objeto escuta.

Aplica-se a