Partager via


ChannelServices.GetChannelSinkProperties(Object) Méthode

Définition

Retourne un IDictionary de propriétés pour un proxy donné.

public:
 static System::Collections::IDictionary ^ GetChannelSinkProperties(System::Object ^ obj);
public static System.Collections.IDictionary GetChannelSinkProperties (object obj);
static member GetChannelSinkProperties : obj -> System.Collections.IDictionary
Public Shared Function GetChannelSinkProperties (obj As Object) As IDictionary

Paramètres

obj
Object

Proxy pour lequel récupérer des propriétés.

Retours

IDictionary

Interface au dictionnaire de propriétés ou null si aucune propriété n'a été trouvée.

Exceptions

Au moins un des appelants à un niveau plus élevé dans la pile des appels n'a pas l'autorisation requise pour configurer les canaux et les types de communication à distance.

Exemples

// Get an IDictionary of properties for a given proxy.
IDictionary^ myDictionary = ChannelServices::GetChannelSinkProperties( myProxy );
ICollection^ myKeysCollection = myDictionary->Keys;
array<Object^>^myKeysArray = gcnew array<Object^>(myKeysCollection->Count);
ICollection^ myValuesCollection = myDictionary->Values;
array<Object^>^myValuesArray = gcnew array<Object^>(myValuesCollection->Count);
myKeysCollection->CopyTo( myKeysArray, 0 );
myValuesCollection->CopyTo( myValuesArray, 0 );
for ( int iIndex = 0; iIndex < myKeysArray->Length; iIndex++ )
{
   Console::WriteLine( "Property Name : {0} value : {1}", myKeysArray[ iIndex ], myValuesArray[ iIndex ] );

}
// Get an IDictionary of properties for a given proxy.
IDictionary myDictionary = ChannelServices.
         GetChannelSinkProperties(myProxy);
ICollection myKeysCollection = myDictionary.Keys;
object[] myKeysArray = new object[myKeysCollection.Count];
ICollection myValuesCollection = myDictionary.Values;
object[] myValuesArray = new object[myValuesCollection.Count];
myKeysCollection.CopyTo(myKeysArray,0);
myValuesCollection.CopyTo(myValuesArray,0);
for(int iIndex=0;iIndex<myKeysArray.Length;iIndex++)
{
   Console.WriteLine("Property Name : "+myKeysArray[iIndex]+
      " value : "+myValuesArray[iIndex]);
}
' Get an IDictionary of properties for a given proxy.
Dim myDictionary As IDictionary = ChannelServices.GetChannelSinkProperties(myProxy)
Dim myKeysCollection As ICollection = myDictionary.Keys
Dim myKeysArray(myKeysCollection.Count-1) As Object
Dim myValuesCollection As ICollection = myDictionary.Values
Dim myValuesArray(myValuesCollection.Count-1) As Object
myKeysCollection.CopyTo(myKeysArray, 0)
myValuesCollection.CopyTo(myValuesArray, 0)
Dim iIndex As Integer
For iIndex = 0 To myKeysArray.Length - 1
   Console.Write("Property Name : " & myKeysArray(iIndex) & " value : ")
   Console.WriteLine(myValuesArray(iIndex))
Next iIndex

S’applique à