Ejemplo n.º 1
0
        internal ILease GetLease(MarshalByRefObject obj)
        {
            bool     fServer  = true;
            Identity identity = MarshalByRefObject.GetIdentity(obj, out fServer);

            return(identity == null ? (ILease)null : (ILease)identity.Lease);
        }
Ejemplo n.º 2
0
 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;
 }