RemotingConfiguration.GetRegisteredWellKnownClientTypes 方法

检索对象类型的数组,这些对象类型在客户端上注册为已知类型。

**命名空间:**System.Runtime.Remoting
**程序集:**mscorlib(在 mscorlib.dll 中)

语法

声明
Public Shared Function GetRegisteredWellKnownClientTypes As WellKnownClientTypeEntry()
用法
Dim returnValue As WellKnownClientTypeEntry()

returnValue = RemotingConfiguration.GetRegisteredWellKnownClientTypes
public static WellKnownClientTypeEntry[] GetRegisteredWellKnownClientTypes ()
public:
static array<WellKnownClientTypeEntry^>^ GetRegisteredWellKnownClientTypes ()
public static WellKnownClientTypeEntry[] GetRegisteredWellKnownClientTypes ()
public static function GetRegisteredWellKnownClientTypes () : WellKnownClientTypeEntry[]

返回值

对象类型的数组,这些对象类型在客户端上注册为已知类型。

异常

异常类型 条件

SecurityException

在调用堆栈上部,至少有一个调用方没有配置远程处理类型和通道的权限。

备注

已知对象类型可以是单个调用,也可以是 singleton。如果对象类型是单个调用,则每次传入来自客户端的调用时均将创建该对象类型的一个新实例。对 singleton 对象的所有调用均由该对象的一个实例来处理。

有关已知对象的更详细说明,请参见 服务器激活

示例

' Get the well-known types registered at the client.
Dim myEntries As WellKnownClientTypeEntry() = _ 
                        RemotingConfiguration.GetRegisteredWellKnownClientTypes()
Console.WriteLine("The number of WellKnownClientTypeEntries are:" +  _ 
                                                  myEntries.Length.ToString())
Console.WriteLine("The Object type is:" + myEntries(0).ObjectType.ToString())
Console.WriteLine("The Object Url is:" + myEntries(0).ObjectUrl.ToString())
// Get the well-known types registered at the client.
WellKnownClientTypeEntry[] myEntries =
       RemotingConfiguration.GetRegisteredWellKnownClientTypes();
Console.WriteLine("The number of WellKnownClientTypeEntries are:"
                           +myEntries.Length);
Console.WriteLine("The Object type is:"+myEntries[0].ObjectType);
Console.WriteLine("The Object Url is:"+myEntries[0].ObjectUrl);
// Get the well-known types registered at the client.
array<WellKnownClientTypeEntry^>^myEntries = RemotingConfiguration::GetRegisteredWellKnownClientTypes();
Console::WriteLine( "The number of WellKnownClientTypeEntries are:{0}", myEntries->Length );
Console::WriteLine( "The Object type is:{0}", myEntries[ 0 ]->ObjectType );
Console::WriteLine( "The Object Url is:{0}", myEntries[ 0 ]->ObjectUrl );
// Get the well-known types registered at the client.
WellKnownClientTypeEntry myEntries[] = RemotingConfiguration.
    GetRegisteredWellKnownClientTypes();
Console.WriteLine("The number of WellKnownClientTypeEntries are:" 
    + myEntries.get_Length());
Console.WriteLine("The Object type is:" + myEntries[0].
    get_ObjectType());
Console.WriteLine("The Object Url is:" + myEntries[0].get_ObjectUrl());

.NET Framework 安全性

平台

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

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

RemotingConfiguration 类
RemotingConfiguration 成员
System.Runtime.Remoting 命名空间
WellKnownClientTypeEntry
WellKnownServiceTypeEntry
RegisterWellKnownServiceType
RegisterWellKnownClientType