Exemple #1
0
        public UpdateTracker getClone(bool bReset)
        {
            UpdateTracker updateTracker = new UpdateTracker();

            updateTracker._modifiedSinceLastRequest = this._modifiedSinceLastRequest;
            updateTracker._tLastRequest             = this._tLastRequest;
            updateTracker._UpdateBindings           = new List <DispatchAttribute>();
            foreach (DispatchAttribute current in this._UpdateBindings)
            {
                updateTracker._UpdateBindings.Add(current.getCopy());
            }
            if (bReset)
            {
                this._modifiedSinceLastRequest = 0u;
                this._tLastRequest             = 0L;
                this._UpdateBindings.Clear();
            }
            return(updateTracker);
        }
Exemple #2
0
 public Session(string user, string password, string serialno, string cookie, bool enableTO, int nTimeout)
 {
     this._tLoginTime      = DateTime.Now;
     this._tRenewTime      = DateTime.Now;
     this._tLastUpdateTime = (long)Environment.TickCount;
     this._timeoutSeconds  = nTimeout;
     this._enableTimeout   = enableTO;
     this._userName        = user;
     this._userPassword    = password;
     this._userType        = 1;
     this._serialno        = serialno;
     this._master          = "";
     this._remote          = "";
     this._logout          = false;
     this._killed          = false;
     this._service_stop    = false;
     this._uid             = -1L;
     this._remoteIP        = "";
     this._Cookie          = cookie;
     this._Delay2Delete    = DateTime.MinValue;
     this._nRenewCount     = 0L;
     this._userRights      = new UserAccessRights();
     this._updateTracker   = new UpdateTracker();
 }