MarshalByRefObject

MarshalByRefObjectCF 1.0, ECMA 1.0, serializable, marshal by reference

System (mscorlib.dll)abstract class

MarshalByRefObject is the base class for objects that are marshaled by reference across AppDomain boundaries. If you attempt to transmit an object that derives from this class to another domain (e.g., as a parameter in a method call to a remote machine), an object reference is sent. (In actuality, this is an object proxy, which provides the same interfacemethods, properties, and so forth.) If the other domain uses this reference (e.g., sets an object property or calls one of its methods), the call is automatically marshaled back to the original domain in which the object was created, and it is invoked there, using the proxy object the .NET Framework creates automatically.

You can inherit from this class to create a remotable object. Values that should be marshaled by reference include unmanaged pointers and file handles, which do not have any meaning in another domain. Objects that are marshaled by reference live until their lifetime lease expires. The MarshalByRefObject class includes methods for getting and setting the ILease object from the System.Runtime.Remoting.Lifetime namespace. More information about remoting can be found in the System.Runtime.Remoting namespace.

public abstract class MarshalByRefObject {
// Protected Constructors
   protected MarshalByRefObject( );
// Public Instance Methods
   public virtual ObjRef CreateObjRef(Type requestedType);
   public object GetLifetimeService( );
   public virtual object InitializeLifetimeService( );
}

Subclasses

Multiple types



    Part II: Programming with the .NET Framework
    Part IV: API Quick Reference
    Chapter 26. System
     
    ASPTreeView.com
     
    Evaluation has ёДХ·ИСТґЩ¶expired.
    Info...