Share via


RemotingConfiguration.GetRegisteredWellKnownServiceTypes Metodo

Definizione

Recupera una matrice di tipi di oggetti registrati sul lato servizio come tipi noti.

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()

Restituisce

Matrice di tipi di oggetti registrati sul lato servizio come tipi noti.

Eccezioni

Almeno uno dei chiamanti in posizione più elevata nello stack di chiamate non dispone delle autorizzazioni alla configurazione di canali e tipi remoti.

Esempio

// 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())

Commenti

I tipi di oggetto noti possono essere una singola chiamata o singleton. Se un tipo di oggetto è una singola chiamata, viene creata una nuova istanza ogni volta che arriva una chiamata dal client. Tutte le chiamate a un oggetto singleton vengono gestite da un'istanza di tale oggetto.

Per una descrizione più dettagliata degli oggetti noti, vedere Attivazione del server.

Si applica a

Vedi anche