Επεξεργασία

Κοινή χρήση μέσω


RemotingServices.GetServerTypeForUri(String) Method

Definition

Returns the Type of the object with the specified 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

Parameters

URI
String

The URI of the object whose Type is requested.

Returns

The Type of the object with the specified URI.

Attributes

Exceptions

Either the immediate caller does not have infrastructure permission, or at least one of the callers higher in the callstack does not have permission to retrieve the type information of non-public members.

Examples

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

Remarks

Because remoting identifies endpoints using URIs, the GetServerTypeForUri method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use IMessage objects, because the current method will return the associated type object from the URI.

Applies to