Indicates that the implementor of this interface is a reference to another object.
IObjectReference
[Visual Basic] Public Interface IObjectReference [C#] public interface IObjectReference [C++] public __gc __interface IObjectReference
[JScript] In JScript, you can use the interfaces in the NGWS frameworks, but you cannot define your own.
Class | Description |
---|---|
ObjRef | Defines the marshaled object reference class.
An ObjRef is a serializable representation of an object used to transfer an object reference across an AppDomain boundary. The act of creating an ObjRef for an object is called marshaling. The ObjRef can be transferred via a channel into another AppDomain (possibly on another process or machine). Once in the other AppDomain, the ObjRef must be parsed to create a Proxy for the Object, generally connected to the real Object. This operation is called unmarshaling. ObjRefs have enough information that describes the Type/ class of the object being marshaled (like the class hierarchy), something that will uniquely identify the specific object instance (the URI) and how to reach the remoting-subdivision where the object lives (communication related information). An important notion to be aware of about marshaling are the semantics of Marshal-by-Value versus Marshal-by-Reference. When a reference to an Object is converted to an ObjRef such that the Proxy created after unmarshaling talks to the original object for most method calls via a proxy, this is called Marshal-by-Reference. However, there are objects whose state does not change in any interesting way once initialized. For such objects, it makes sense to send over the entire state of the Object in the ObjRef and then create a local object that is a clone of the remote one within the remoting-boundary of the client. This is called Marshal-by-Value. |
Notes to Implementers: Implement this interface on objects that are actually references to a different object, which can't be resolved until this object is completely restored. During the fixup stage, any object implementing IObjectReference is asked for its "real" object and that object is inserted into the graph.
Namespace: System.Runtime.Serialization
Assembly: mscorlib.dll
IObjectReference Members | System.Runtime.Serialization Namespace