This documentation is archived and is not being maintained.

ChannelServices.GetChannelSinkProperties Method

Returns a IDictionary of properties for a given proxy.

Namespace: System.Runtime.Remoting.Channels
Assembly: mscorlib (in mscorlib.dll)

public static IDictionary GetChannelSinkProperties (
	Object obj
)
public static IDictionary GetChannelSinkProperties (
	Object obj
)
public static function GetChannelSinkProperties (
	obj : Object
) : IDictionary

Parameters

obj

The proxy to retrieve properties for.

Return Value

An interface to the dictionary of properties, or a null reference (Nothing in Visual Basic) if no properties were found.

Exception typeCondition

SecurityException

At least one of the callers that is higher in the callstack does not have permission to configure remoting types and channels.

// 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]);
}

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0
Show: