2.2.2.1 ObjRef

ObjRef is a Class. The Library name of the Class is "mscorlib". It represents a Server Object Reference. It is Assignable to Remoting Types of all Server Objects.

 namespace System.Runtime.Remoting
 {
   class ObjRef
   { 
     String                               uri;
     Int32                                objRefFlags;
     System.Runtime.Remoting.TypeInfo     typeInfo;
     System.Runtime.Remoting.EnvoyInfo    envoyInfo;
     System.Runtime.Remoting.ChannelInfo  channelInfo;
     Bool                                 fIsMarshalled;
   }
 }
  
  

uri: A URI that identifies the Server Object.

objRefFlags: An Int32 value that indicates whether the ObjRef is created from a MSO or from a SAO. If the second lowest bit (value of 2) is set, then ObjRef is created from an SAO. Otherwise, it is created from an MSO.

typeInfo: A TypeInfo instance that contains name, Base Class, and Interfaces of the Server Type.

envoyInfo: An instance of EnvoyInfo that contains the Envoy Sink Information of the Server Object.

channelInfo: A ChannelInfo instance that contains a list of ServerURIs.

fIsMarshalled: An Int32 value that specifies whether ObjRef is well-formed. An ObjRef is well-formed if all of the following are true:

  • The ObjRef Class is not a Null Object.

  • The uri field is not a Null Object.

  • One of the following is true:

    • The second lowest bit of objRefFlags (value of 2) is set.

    • The channelInfo field is not a Null Object.

    If the second lowest bit (value of 2) is set, then the value of the uri field MUST be an absolute URI. Otherwise, the value of the uri field MUST be a relative URI.