RemotingConfiguration.GetRegisteredWellKnownServiceTypes Metoda

Definicja

Pobiera tablicę typów obiektów zarejestrowanych na końcu usługi, jak również znanych typów.

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

Zwraca

Tablica typów obiektów zarejestrowanych na końcu usługi, jak również znanych typów.

Wyjątki

Co najmniej jeden z wywołujących wyżej w stosie wywołań nie ma uprawnień do konfigurowania typów komunikacji telefonicznej i kanałów.

Przykłady

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

Uwagi

Dobrze znane typy obiektów mogą być pojedynczym wywołaniem lub pojedynczymi. Jeśli typ obiektu jest pojedynczym wywołaniem, nowe wystąpienie jest tworzone przy każdym wywołaniu klienta. Wszystkie wywołania pojedynczego obiektu są obsługiwane przez jedno wystąpienie tego obiektu.

Aby uzyskać bardziej szczegółowy opis dobrze znanych obiektów, zobacz Aktywacja serwera.

Dotyczy

Zobacz też