Udostępnij za pośrednictwem


ChannelServices.GetChannelSinkProperties(Object) Metoda

Definicja

IDictionary Zwraca właściwości dla danego serwera proxy.

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

Parametry

obj
Object

Serwer proxy do pobierania właściwości.

Zwraca

IDictionary

Interfejs do słownika właściwości lub null jeśli nie znaleziono żadnych właściwości.

Wyjątki

Co najmniej jeden z wywołujących, który jest wyższy w stosie wywołań, nie ma uprawnień do konfigurowania typów komunikacji telefonicznej i kanałów.

Przykłady

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

Dotyczy