RemotingServices.GetServerTypeForUri(String) Método

Definição

Devolve o Type do objeto com o URI especificado.

public:
 static Type ^ GetServerTypeForUri(System::String ^ URI);
public static Type GetServerTypeForUri(string URI);
[System.Security.SecurityCritical]
public static Type GetServerTypeForUri(string URI);
static member GetServerTypeForUri : string -> Type
[<System.Security.SecurityCritical>]
static member GetServerTypeForUri : string -> Type
Public Shared Function GetServerTypeForUri (URI As String) As Type

Parâmetros

URI
String

O URI do objeto que Type é solicitado.

Devoluções

O Type do objeto com o URI especificado.

Atributos

Exceções

Ou o interlocutor imediato não tem autorização de infraestrutura, ou pelo menos um dos que estão mais acima na pilha de chamadas não tem permissão para recuperar o tipo de informação dos membros privados.

Exemplos

Console::WriteLine( "Server type: {0}", RemotingServices::GetServerTypeForUri( const_cast<String^>(myObjectUri) ) );
Console.WriteLine("Server type: {0}",
                  RemotingServices.GetServerTypeForUri(myObjectUri));
Console.WriteLine("Server type: {0}", _
                  RemotingServices.GetServerTypeForUri(myObjectUri).ToString())

Observações

Como o remoting identifica endpoints usando URIs, o GetServerTypeForUri método é muito útil nas partes pluggáveis da infraestrutura de remoting (por exemplo, channel sinks, sinks dinâmicos e context) que usam IMessage objetos, porque o método atual devolverá o objeto tipo associado do URI.

Aplica-se a