Sdílet prostřednictvím


RemotingServices.GetServerTypeForUri(String) Metoda

Definice

Vrátí hodnotu Type objektu se zadaným identifikátorem URI.

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

Parametry

URI
String

Identifikátor URI objektu, jehož Type je požadován.

Návraty

Objekt Type se zadaným identifikátorem URI.

Atributy

Výjimky

Buď přímý volající nemá oprávnění k infrastruktuře, nebo alespoň jeden z volajících výše v seznamu volání nemá oprávnění k načtení informací o typu neveřejných členů.

Příklady

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

Poznámky

Vzhledem k tomu, že vzdálené komunikace identifikuje koncové body pomocí identifikátorů URI, GetServerTypeForUri je metoda velmi užitečná v připojitelných částech infrastruktury vzdálené komunikace (například jímky kanálů, dynamické jímky a kontextové jímky), které používají IMessage objekty, protože aktuální metoda vrátí přidružený objekt typu z identifikátoru URI.

Platí pro