RemotingConfiguration.IsRemotelyActivatedClientType Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Vérifie si le type d’objet spécifié est inscrit en tant que type client activé à distance.
Surcharges
| Nom | Description |
|---|---|
| IsRemotelyActivatedClientType(String, String) |
Vérifie si l’objet spécifié par son nom de type et son nom d’assembly sont inscrits en tant que type client activé à distance. |
| IsRemotelyActivatedClientType(Type) |
Vérifie si l’objet Type spécifié est inscrit en tant que type de client activé à distance. |
IsRemotelyActivatedClientType(String, String)
Vérifie si l’objet spécifié par son nom de type et son nom d’assembly sont inscrits en tant que type client activé à distance.
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
Paramètres
- typeName
- String
Nom de type de l’objet à vérifier.
- assemblyName
- String
Nom de l’assembly de l’objet à vérifier.
Retours
Qui ActivatedClientTypeEntry correspond au type d’objet spécifié.
Exceptions
Au moins un des appelants plus haut dans la pile d’appels n’est pas autorisé à configurer les types et canaux de communication à distance.
Exemples
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
S’applique à
IsRemotelyActivatedClientType(Type)
Vérifie si l’objet Type spécifié est inscrit en tant que type de client activé à distance.
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
Paramètres
- svrType
- Type
Type d’objet à vérifier.
Retours
Qui ActivatedClientTypeEntry correspond au type d’objet spécifié.
Exceptions
Au moins un des appelants plus haut dans la pile d’appels n’est pas autorisé à configurer les types et canaux de communication à distance.
Exemples
// 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())