语言

RemotingServices.GetServerTypeForUri(String) 方法

定义

返回 Type 具有指定 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

参数

URI
String

请求的对象 Type URI。

返回

Type具有指定 URI 的对象。

属性

例外

直接调用方没有基础结构权限,或者调用堆栈中至少有一个调用方没有检索非公共成员的类型信息的权限。

示例

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

注解

由于远程处理使用 URI 标识终结点,因此 GetServerTypeForUri 此方法在远程处理基础结构(例如通道接收器、动态接收器和上下文接收器)的可插入部分非常有用 IMessage ,因为当前方法将从 URI 返回关联的类型对象。

适用于