IpcServerChannel.ChannelData Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient les données spécifiques au canal.
public:
property System::Object ^ ChannelData { System::Object ^ get(); };
public object ChannelData { get; }
member this.ChannelData : obj
Public ReadOnly Property ChannelData As Object
Valeur de propriété
Instance de ChannelDataStore contenant les données spécifiques de canal.
Implémente
Exemples
L'exemple de code suivant montre comment utiliser la propriété ChannelData.
// 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);
}
Remarques
Bien qu’elle soit retournée en tant que instance de la System.Object classe, la valeur de cette propriété peut être convertie en une instance de ChannelDataStore qui décrit le canal vers lequel l’objet IpcServerChannel écoute.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour