using System; using System.Runtime.InteropServices; using System.Runtime.Remoting; using System.Runtime.Remoting.Lifetime; namespace System { /// Enables access to objects across application domain boundaries in applications that support remoting. /// 2 // Token: 0x0200005F RID: 95 [ComVisible(true)] [Serializable] public abstract class MarshalByRefObject { // Token: 0x060006AC RID: 1708 RVA: 0x00014FF8 File Offset: 0x000131F8 internal Identity GetObjectIdentity(MarshalByRefObject obj, out bool IsClient) { IsClient = false; Identity identity; if (RemotingServices.IsTransparentProxy(obj)) { identity = RemotingServices.GetRealProxy(obj).ObjectIdentity; IsClient = true; } else { identity = obj.ObjectIdentity; } return identity; } // Token: 0x170000C8 RID: 200 // (get) Token: 0x060006AD RID: 1709 RVA: 0x00015034 File Offset: 0x00013234 // (set) Token: 0x060006AE RID: 1710 RVA: 0x0001503C File Offset: 0x0001323C internal ServerIdentity ObjectIdentity { get { return this._identity; } set { this._identity = value; } } /// Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. /// Information required to generate a proxy. /// The of the object that the new will reference. /// This instance is not a valid remoting object. /// The immediate caller does not have infrastructure permission. /// 2 /// /// /// // Token: 0x060006AF RID: 1711 RVA: 0x00015048 File Offset: 0x00013248 public virtual ObjRef CreateObjRef(Type requestedType) { if (this._identity == null) { throw new RemotingException(Locale.GetText("No remoting information was found for the object.")); } return this._identity.CreateObjRef(requestedType); } /// Retrieves the current lifetime service object that controls the lifetime policy for this instance. /// An object of type used to control the lifetime policy for this instance. /// The immediate caller does not have infrastructure permission. /// 2 /// /// /// // Token: 0x060006B0 RID: 1712 RVA: 0x00015074 File Offset: 0x00013274 public object GetLifetimeService() { if (this._identity == null) { return null; } return this._identity.Lease; } /// Obtains a lifetime service object to control the lifetime policy for this instance. /// An object of type used to control the lifetime policy for this instance. This is the current lifetime service object for this instance if one exists; otherwise, a new lifetime service object initialized to the value of the property. /// The immediate caller does not have infrastructure permission. /// 2 /// /// /// // Token: 0x060006B1 RID: 1713 RVA: 0x00015090 File Offset: 0x00013290 public virtual object InitializeLifetimeService() { if (this._identity != null && this._identity.Lease != null) { return this._identity.Lease; } return new Lease(); } /// Creates a shallow copy of the current object. /// A shallow copy of the current object. /// false to delete the current object's identity, which will cause the object to be assigned a new identity when it is marshaled across a remoting boundary. A value of false is usually appropriate. true to copy the current object's identity to its clone, which will cause remoting client calls to be routed to the remote server object. // Token: 0x060006B2 RID: 1714 RVA: 0x000150CC File Offset: 0x000132CC protected MarshalByRefObject MemberwiseClone(bool cloneIdentity) { MarshalByRefObject marshalByRefObject = (MarshalByRefObject)base.MemberwiseClone(); if (!cloneIdentity) { marshalByRefObject._identity = null; } return marshalByRefObject; } // Token: 0x040000BB RID: 187 [NonSerialized] private ServerIdentity _identity; } }