RemotingServices.GetServerTypeForUri(String) Méthode

Définition

Retourne l’objet Type avec l’URI spécifié.

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

Paramètres

URI
String

URI de l’objet dont Type l’objet est demandé.

Retours

De Type l’objet avec l’URI spécifié.

Attributs

Exceptions

Soit l’appelant immédiat n’a pas d’autorisation d’infrastructure, soit au moins l’un des appelants plus haut dans la pile d’appels n’a pas l’autorisation de récupérer les informations de type des membres non publics.

Exemples

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

Remarques

Étant donné que la communication à distance identifie les points de terminaison à l’aide d’URI, la GetServerTypeForUri méthode est très utile dans les parties enfichables de l’infrastructure de communication à distance (par exemple, récepteurs de canal, récepteurs dynamiques et récepteurs de contexte) qui utilisent IMessage des objets, car la méthode actuelle retourne l’objet de type associé à partir de l’URI.

S’applique à