RemotingConfiguration.GetRegisteredWellKnownServiceTypes Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Recupera uma matriz de tipos de objeto registrados no final do serviço como tipos conhecidos.
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()
Retornos
Uma matriz de tipos de objeto registrados no final do serviço como tipos conhecidos.
Exceções
Pelo menos um dos chamadores mais altos na caixa de chamadas não tem permissão para configurar tipos e canais de comunicação remota.
Exemplos
// 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())
Comentários
Tipos de objeto conhecidos podem ser de chamada única ou singleton. Se um tipo de objeto for uma única chamada, uma nova instância dele será criada sempre que uma chamada do cliente entrar. Todas as chamadas para um objeto singleton são tratadas por uma instância desse objeto.