internal ILease GetLease(MarshalByRefObject obj) { bool fServer = true; Identity identity = MarshalByRefObject.GetIdentity(obj, out fServer); return(identity == null ? (ILease)null : (ILease)identity.Lease); }
internal Lease( TimeSpan initialLeaseTime, TimeSpan renewOnCallTime, TimeSpan sponsorshipTimeout, MarshalByRefObject managedObject) { this.id = Lease.nextId++; this.renewOnCallTime = renewOnCallTime; this.sponsorshipTimeout = sponsorshipTimeout; this.initialLeaseTime = initialLeaseTime; this.managedObject = managedObject; this.leaseManager = LeaseManager.GetLeaseManager(); this.sponsorTable = new Hashtable(10); this.state = LeaseState.Initial; }