Example #1
0
        public UserAccessRights getClone()
        {
            UserAccessRights userAccessRights = new UserAccessRights();

            userAccessRights._userName      = this._userName;
            userAccessRights._userID        = this._userID;
            userAccessRights._usrerType     = this._usrerType;
            userAccessRights._DeviceList    = this._DeviceList;
            userAccessRights._GroupList     = this._GroupList;
            userAccessRights._authGroupList = new Dictionary <long, long>();
            foreach (KeyValuePair <long, long> current in this._authGroupList)
            {
                userAccessRights._authGroupList.Add(current.Key, current.Value);
            }
            userAccessRights._authZoneList = new Dictionary <long, long>();
            foreach (KeyValuePair <long, long> current2 in this._authZoneList)
            {
                userAccessRights._authZoneList.Add(current2.Key, current2.Value);
            }
            userAccessRights._authPortList = new Dictionary <long, long>();
            foreach (KeyValuePair <long, long> current3 in this._authPortList)
            {
                userAccessRights._authPortList.Add(current3.Key, current3.Value);
            }
            userAccessRights._authRackDeviceList = this.getRackDeviceListClone();
            userAccessRights._authDevicePortList = this.getDeviceListClone();
            return(userAccessRights);
        }
Example #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();
 }