Compartir a través de


ChannelServices.GetChannelSinkProperties(Object) Método

Definición

Devuelve un IDictionary de propiedades para un proxy determinado.

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

Parámetros

obj
Object

Proxy cuyas propiedades se van a recuperar.

Devoluciones

IDictionary

Interfaz al diccionario de propiedades o null si no se encontraron propiedades.

Excepciones

Al menos uno de los llamadores situados en la parte superior de la pila de llamadas no tiene permiso para configurar los tipos y canales de comunicación remota.

Ejemplos

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

Se aplica a