Teilen über


ChannelServices.GetChannelSinkProperties(Object) Methode

Definition

Gibt ein IDictionary mit Eigenschaften für einen angegebenen Proxy zurück.

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

Parameter

obj
Object

Der Proxy, für den Eigenschaften abgerufen werden sollen.

Gibt zurück

IDictionary

Eine Schnittstelle zum Wörterbuch von Eigenschaften oder null, wenn keine Eigenschaften gefunden wurden.

Ausnahmen

Mindestens einer der Aufrufer an höherer Position im Aufrufstapel verfügt nicht über die Berechtigung zum Konfigurieren von Remotetypen und Channels.

Beispiele

// 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

Gilt für