Share via


RemotingConfiguration.GetRegisteredActivatedServiceTypes Méthode

Définition

Récupère un tableau de types d'objets inscrits sur le service qui peuvent être activés à la demande à partir d'un client.

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

Retours

Tableau de types d'objets inscrits sur le service qui peuvent être activés à la demande à partir d'un client.

Exceptions

Au moins un des appelants à un niveau plus élevé dans la pile des appels n'a pas l'autorisation de configuration des types et des canaux de communication à distance.

Exemples

// Check whether the 'MyServerImpl' object is allowed for 
// activation or not.
if ( RemotingConfiguration::IsActivationAllowed( MyServerImpl::typeid ) )
{
   // Get the registered activated service types .
   array<ActivatedServiceTypeEntry^>^myActivatedServiceEntries = RemotingConfiguration::GetRegisteredActivatedServiceTypes();
   Console::WriteLine( "The Length of the registered activated service type array is {0}", myActivatedServiceEntries->Length );
   Console::WriteLine( "The Object type is:{0}", myActivatedServiceEntries[ 0 ]->ObjectType );
}

// Check whether the 'MyServerImpl' object is allowed for
// activation or not.
if(RemotingConfiguration.IsActivationAllowed(typeof(MyServerImpl)))
{
 // Get the registered activated service types .
 ActivatedServiceTypeEntry[] myActivatedServiceEntries =
       RemotingConfiguration.GetRegisteredActivatedServiceTypes();
Console.WriteLine("The Length of the registered activated service"
                 +" type array is "+myActivatedServiceEntries.Length);
Console.WriteLine("The Object type is:"
                    +myActivatedServiceEntries[0].ObjectType);
}
' Check whether the 'MyServerImpl' object is allowed for activation or not.
If RemotingConfiguration.IsActivationAllowed(GetType(MyServerImpl)) Then
   ' Get the registered activated service types .
   Dim myActivatedServiceEntries As ActivatedServiceTypeEntry() = _ 
                       RemotingConfiguration.GetRegisteredActivatedServiceTypes()
   Console.WriteLine("The Length of the registered activated service type array is " + _ 
                                  myActivatedServiceEntries.Length.ToString())
   Console.WriteLine("The Object type is:" + _ 
                           myActivatedServiceEntries(0).ObjectType.ToString())
End If

Remarques

Pour obtenir une description détaillée des objets activés par le client, consultez Activation du client.

S’applique à

Voir aussi