RemotingServices.GetObjectUri(MarshalByRefObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the URI for the specified object.
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
The MarshalByRefObject for which a URI is requested.
Returns
The URI of the specified object if it has one, or null
if the object has not yet been marshaled.
- Attributes
Exceptions
The immediate caller does not have infrastructure permission.
Examples
//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
Applies to
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.