RemotingConfiguration.GetRegisteredWellKnownClientTypes 方法

定义

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

public:
 static cli::array <System::Runtime::Remoting::WellKnownClientTypeEntry ^> ^ GetRegisteredWellKnownClientTypes();
public static System.Runtime.Remoting.WellKnownClientTypeEntry[] GetRegisteredWellKnownClientTypes ();
static member GetRegisteredWellKnownClientTypes : unit -> System.Runtime.Remoting.WellKnownClientTypeEntry[]
Public Shared Function GetRegisteredWellKnownClientTypes () As WellKnownClientTypeEntry()

返回

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

例外

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

示例

// 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.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.
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())

注解

已知对象类型可以是单个调用或单一实例。 如果对象类型是单个调用,则每次来自客户端的调用时,都会创建它的新实例。 对单一实例对象的所有调用都由该对象的一个实例处理。

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

适用于

另请参阅