Freigeben über


RemotingConfiguration.GetRegisteredActivatedServiceTypes-Methode

Ruft ein Array auf der Serverseite registrierter Objekttypen ab, die auf Anforderung eines Clients aktiviert werden können.

Namespace: System.Runtime.Remoting
Assembly: mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Function GetRegisteredActivatedServiceTypes As ActivatedServiceTypeEntry()
'Usage
Dim returnValue As ActivatedServiceTypeEntry()

returnValue = RemotingConfiguration.GetRegisteredActivatedServiceTypes
public static ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes ()
public:
static array<ActivatedServiceTypeEntry^>^ GetRegisteredActivatedServiceTypes ()
public static ActivatedServiceTypeEntry[] GetRegisteredActivatedServiceTypes ()
public static function GetRegisteredActivatedServiceTypes () : ActivatedServiceTypeEntry[]

Rückgabewert

Ein Array auf der Dienstseite registrierter Objekttypen, die auf Anforderung eines Clients aktiviert werden können.

Ausnahmen

Ausnahmetyp Bedingung

SecurityException

Mindestens einer der Aufrufer an höherer Position im Aufrufstapel verfügt nicht über die Berechtigung zum Konfigurieren von Remotetypen und Channels.

Hinweise

Eine ausführliche Beschreibung vom Client aktivierter Objekte finden Sie unter Clientaktivierung.

Beispiel

' 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
// 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( 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(MyServerImpl.
    class.ToType())) {
    // Get the registered activated service types .
    ActivatedServiceTypeEntry myActivatedServiceEntries[] = 
        RemotingConfiguration.GetRegisteredActivatedServiceTypes();
    Console.WriteLine("The Length of the registered activated service"
        + " type array is " + myActivatedServiceEntries.get_Length());
    Console.WriteLine("The Object type is:"
        + myActivatedServiceEntries[0].get_ObjectType());
}

.NET Framework-Sicherheit

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

RemotingConfiguration-Klasse
RemotingConfiguration-Member
System.Runtime.Remoting-Namespace
ActivatedServiceTypeEntry-Klasse
ActivatedClientTypeEntry-Klasse
RegisterActivatedServiceType
RegisterActivatedClientType