IRemotingTypeInfo Interface
.NET Framework (current version)
Provides type information for an object.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() | CanCastTo(Type^, Object^) | Checks whether the proxy that represents the specified object type can be cast to the type represented by the IRemotingTypeInfo interface. |
Use this interface to provide custom type information that is carried along with the ObjRef objects.
ObjRef^ objRefSample = RemotingServices::GetObjRefForProxy( myRemoteObject ); Console::WriteLine( "***ObjRef Details***" ); Console::WriteLine( "URI:\t {0}", objRefSample->URI ); array<Object^>^channelData = objRefSample->ChannelInfo->ChannelData; Console::WriteLine( "Channel Info:" ); for each(Object^ o in channelData) Console::WriteLine("\t{0}", o->ToString()); IEnvoyInfo^ envoyInfo = objRefSample->EnvoyInfo; if ( envoyInfo == nullptr ) { Console::WriteLine( "This ObjRef does not have envoy information." ); } else { IMessageSink^ envoySinks = envoyInfo->EnvoySinks; Console::WriteLine( "Envoy Sink Class: {0}", envoySinks ); } IRemotingTypeInfo^ typeInfo = objRefSample->TypeInfo; Console::WriteLine( "Remote type name: {0}", typeInfo->TypeName ); Console::WriteLine( "Can my Object cast to a Bitmap? {0}", typeInfo->CanCastTo( System::Drawing::Bitmap::typeid, objRefSample ) ); Console::WriteLine( "Is this Object from this AppDomain? {0}", objRefSample->IsFromThisAppDomain() ); Console::WriteLine( "Is this Object from this process? {0}", objRefSample->IsFromThisProcess() );
.NET Framework
Available since 1.1
Available since 1.1
Show:

