RemotingServices.GetObjectUri(MarshalByRefObject) Methode

Definitie

Haalt de URI voor het opgegeven object op.

public:
 static System::String ^ GetObjectUri(MarshalByRefObject ^ obj);
public static string GetObjectUri(MarshalByRefObject obj);
[System.Security.SecurityCritical]
public static string GetObjectUri(MarshalByRefObject obj);
static member GetObjectUri : MarshalByRefObject -> string
[<System.Security.SecurityCritical>]
static member GetObjectUri : MarshalByRefObject -> string
Public Shared Function GetObjectUri (obj As MarshalByRefObject) As String

Parameters

obj
MarshalByRefObject

De MarshalByRefObject URI waarvoor een URI wordt aangevraagd.

Retouren

De URI van het opgegeven object als het een object heeft of null als het object nog niet is marshaled.

Kenmerken

Uitzonderingen

De directe beller heeft geen infrastructuurmachtiging.

Voorbeelden

//GetRealProxy, GetObjectUri, GetEnvoyChainForProxy
RealProxy^ proxy = RemotingServices::GetRealProxy( obj );
Console::WriteLine( "Real proxy type: {0}", proxy->GetProxiedType() );
Console::WriteLine( "Object URI: {0}", RemotingServices::GetObjectUri( obj ) );
IMessageSink^ msgSink = RemotingServices::GetEnvoyChainForProxy( obj )->NextSink;
// GetRealProxy, GetObjectUri, GetEnvoyChainForProxy
RealProxy proxy = RemotingServices.GetRealProxy(obj);
Console.WriteLine("Real proxy type: {0}", proxy.GetProxiedType().ToString());

Console.WriteLine("Object URI: {0}", RemotingServices.GetObjectUri(obj).ToString());

IMessageSink  msgSink = RemotingServices.GetEnvoyChainForProxy(obj).NextSink;
' GetRealProxy, GetObjectUri, GetEnvoyChainForProxy
Dim proxy As RealProxy = RemotingServices.GetRealProxy(obj)
Console.WriteLine("Real proxy type: {0}", proxy.GetProxiedType().ToString())

Console.WriteLine("Object URI: {0}", RemotingServices.GetObjectUri(obj).ToString())

Dim msgSink As IMessageSink = RemotingServices.GetEnvoyChainForProxy(obj).NextSink

Van toepassing op