RemotingConfiguration.IsRemotelyActivatedClientType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检查指定的对象类型是否注册为远程激活的客户端类型。
重载
IsRemotelyActivatedClientType(String, String) |
检查由其类型名称和程序集名称指定的对象是否注册为远程激活的客户端类型。 |
IsRemotelyActivatedClientType(Type) |
检查指定的对象 Type 是否注册为远程激活的客户端类型。 |
IsRemotelyActivatedClientType(String, String)
检查由其类型名称和程序集名称指定的对象是否注册为远程激活的客户端类型。
public:
static System::Runtime::Remoting::ActivatedClientTypeEntry ^ IsRemotelyActivatedClientType(System::String ^ typeName, System::String ^ assemblyName);
public static System.Runtime.Remoting.ActivatedClientTypeEntry IsRemotelyActivatedClientType (string typeName, string assemblyName);
static member IsRemotelyActivatedClientType : string * string -> System.Runtime.Remoting.ActivatedClientTypeEntry
Public Shared Function IsRemotelyActivatedClientType (typeName As String, assemblyName As String) As ActivatedClientTypeEntry
参数
- typeName
- String
要检查的对象的类型名称。
- assemblyName
- String
要检查的对象的程序集名称。
返回
与指定的对象类型对应的 ActivatedClientTypeEntry。
例外
在调用堆栈上部,至少有一个调用方没有配置远程处理类型和通道的权限。
示例
Assembly^ myAssembly = Assembly::GetAssembly( MyServerImpl::typeid );
AssemblyName^ myName = myAssembly->GetName();
// Check whether the 'MyServerImpl' type is registered as
// a remotely activated client type.
ActivatedClientTypeEntry^ myActivatedClientEntry =
RemotingConfiguration::IsRemotelyActivatedClientType( MyServerImpl::typeid->FullName, myName->Name );
Console::WriteLine( "The Object type : {0}", myActivatedClientEntry->ObjectType );
Console::WriteLine( "The Application Url : {0}", myActivatedClientEntry->ApplicationUrl );
if (myActivatedClientEntry)
Console::WriteLine( "The object is client activated");
else
Console::WriteLine("The object is not client activated");
Assembly myAssembly = Assembly.GetAssembly(typeof(MyServerImpl));
AssemblyName myName = myAssembly.GetName();
// Check whether the 'MyServerImpl' type is registered as
// a remotely activated client type.
ActivatedClientTypeEntry myActivatedClientEntry =
RemotingConfiguration.IsRemotelyActivatedClientType(
(typeof(MyServerImpl)).FullName,myName.Name);
Console.WriteLine("The Object type : "
+myActivatedClientEntry.ObjectType);
Console.WriteLine("The Application Url : "
+myActivatedClientEntry.ApplicationUrl);
if (myActivatedClientEntry != null)
Console.WriteLine("Object is client activated");
else
Console.WriteLine("Object is not client activated");
Dim myAssembly As [Assembly] = [Assembly].GetAssembly(GetType(MyServerImpl))
Dim myName As AssemblyName = myAssembly.GetName()
' Check whether the 'MyServerImpl' type is registered as
' a remotely activated client type.
Dim myActivatedClientEntry As ActivatedClientTypeEntry = _
RemotingConfiguration.IsRemotelyActivatedClientType(GetType(MyServerImpl).FullName, _
myName.Name)
Console.WriteLine("The Object type : " + myActivatedClientEntry.ObjectType.ToString())
Console.WriteLine("The Application Url : " + myActivatedClientEntry.ApplicationUrl)
if myActivatedClientEntry is nothing then
Console.WriteLine("The object is not client activated")
else
Console.WriteLine("The object is client activated")
end if
另请参阅
适用于
IsRemotelyActivatedClientType(Type)
检查指定的对象 Type 是否注册为远程激活的客户端类型。
public:
static System::Runtime::Remoting::ActivatedClientTypeEntry ^ IsRemotelyActivatedClientType(Type ^ svrType);
public static System.Runtime.Remoting.ActivatedClientTypeEntry IsRemotelyActivatedClientType (Type svrType);
static member IsRemotelyActivatedClientType : Type -> System.Runtime.Remoting.ActivatedClientTypeEntry
Public Shared Function IsRemotelyActivatedClientType (svrType As Type) As ActivatedClientTypeEntry
参数
- svrType
- Type
要检查的对象类型。
返回
与指定的对象类型对应的 ActivatedClientTypeEntry。
例外
在调用堆栈上部,至少有一个调用方没有配置远程处理类型和通道的权限。
示例
// Check whether the 'MyServerImpl' type is registered as
// a remotely activated client type.
ActivatedClientTypeEntry^ myActivatedClientEntry = RemotingConfiguration::IsRemotelyActivatedClientType( MyServerImpl::typeid);
Console::WriteLine( "The Object type is {0}", myActivatedClientEntry->ObjectType );
Console::WriteLine( "The Application Url is {0}", myActivatedClientEntry->ApplicationUrl );
// Check whether the 'MyServerImpl' type is registered as
// a remotely activated client type.
ActivatedClientTypeEntry myActivatedClientEntry =
RemotingConfiguration.IsRemotelyActivatedClientType(
typeof(MyServerImpl));
Console.WriteLine("The Object type is "
+myActivatedClientEntry.ObjectType);
Console.WriteLine("The Application Url is "
+myActivatedClientEntry.ApplicationUrl);
' Check whether the 'MyServerImpl' type is registered as a remotely activated client type.
Dim myActivatedClientEntry As ActivatedClientTypeEntry = _
RemotingConfiguration.IsRemotelyActivatedClientType(GetType(MyServerImpl))
Console.WriteLine("The Object type is " + myActivatedClientEntry.ObjectType.ToString())
Console.WriteLine("The Application Url is " + _
myActivatedClientEntry.ApplicationUrl.ToString())