RemotingConfiguration.GetRegisteredWellKnownServiceTypes 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检索对象类型的数组,这些对象类型在服务端上注册为已知类型。
public:
static cli::array <System::Runtime::Remoting::WellKnownServiceTypeEntry ^> ^ GetRegisteredWellKnownServiceTypes();
public static System.Runtime.Remoting.WellKnownServiceTypeEntry[] GetRegisteredWellKnownServiceTypes ();
static member GetRegisteredWellKnownServiceTypes : unit -> System.Runtime.Remoting.WellKnownServiceTypeEntry[]
Public Shared Function GetRegisteredWellKnownServiceTypes () As WellKnownServiceTypeEntry()
返回
对象类型的数组,这些对象类型在服务端上注册为已知类型。
例外
在调用堆栈上部,至少有一个调用方没有配置远程处理类型和通道的权限。
示例
// Retrive the array of objects registered as well known types at
// the service end.
array<WellKnownServiceTypeEntry^>^myEntries = RemotingConfiguration::GetRegisteredWellKnownServiceTypes();
Console::WriteLine( "The number of WellKnownServiceTypeEntries are:{0}", myEntries->Length );
Console::WriteLine( "The Object Type is:{0}", myEntries[ 0 ]->ObjectType );
Console::WriteLine( "The Object Uri is:{0}", myEntries[ 0 ]->ObjectUri );
Console::WriteLine( "The Mode is:{0}", myEntries[ 0 ]->Mode );
// Retrive the array of objects registered as well known types at
// the service end.
WellKnownServiceTypeEntry[] myEntries =
RemotingConfiguration.GetRegisteredWellKnownServiceTypes();
Console.WriteLine("The number of WellKnownServiceTypeEntries are:"
+myEntries.Length);
Console.WriteLine("The Object Type is:"+myEntries[0].ObjectType);
Console.WriteLine("The Object Uri is:"+myEntries[0].ObjectUri);
Console.WriteLine("The Mode is:"+myEntries[0].Mode);
' Retrive the array of objects registered as well known types at
' the service end.
Dim myEntries As WellKnownServiceTypeEntry() = _
RemotingConfiguration.GetRegisteredWellKnownServiceTypes()
Console.WriteLine("The number of WellKnownServiceTypeEntries are:" + myEntries.Length.ToString())
Console.WriteLine("The Object Type is:" + myEntries(0).ObjectType.ToString())
Console.WriteLine("The Object Uri is:" + myEntries(0).ObjectUri)
Console.WriteLine("The Mode is:" + myEntries(0).Mode.ToString())
注解
已知对象类型可以是单个调用或单一实例。 如果对象类型是单个调用,则每次来自客户端的调用传入时,都会创建一个新的 实例。 对单一实例对象的所有调用都由该对象的一个实例处理。
有关已知对象的更详细说明,请参阅 服务器激活。