Ejemplo n.º 1
0
 public EntityConfig(string dictionaryName, string entityName, Type entityType)
 {
     this.DictionaryName = dictionaryName;
     this.EntityName     = entityName.ToLower();
     this.Partition      = FnvHash.Hash(this.EntityName);
     this.EntityType     = entityType;
 }
 public EdgeDevice(string deviceId, string deviceName)
 {
     this.Id            = FnvHash.GetUniqueId();
     this.DeviceId      = deviceId;
     this.DeviceName    = deviceName;
     this.EventsCount   = 0;
     this.MessagesCount = 0;
 }
Ejemplo n.º 3
0
 public User(string firstName, string lastName, string username, string password = null)
 {
     this.Id        = FnvHash.GetUniqueId();
     this.FirstName = firstName;
     this.LastName  = lastName;
     this.Username  = username;
     this.Password  = password;
 }
Ejemplo n.º 4
0
        public static string CreateNewSession()
        {
            string strRet = FnvHash.GetUniqueId();

            if (!SessionManager.sessionsBag.TryAdd(strRet, new SessionContainer(strRet)))
            {
                Console.WriteLine("Could not add SessionContainer to sessions bag - sessionId=[" + strRet + "]");
            }

            if (!SessionManager.sessionThreadFlag)
            {
                SessionManager.sessionThread = new Thread(new ThreadStart(ExpireIdleSessions));
                SessionManager.sessionThread.Start();
                SessionManager.sessionThreadFlag = true;
            }

            return(strRet);
        }
 public EdgeDevice(string deviceId)
 {
     this.Id         = FnvHash.GetUniqueId();
     this.DeviceId   = deviceId;
     this.DeviceName = deviceId;
 }
 public EdgeDevice()
 {
     this.Id = FnvHash.GetUniqueId();
 }
Ejemplo n.º 7
0
 public User()
 {
     this.Id = FnvHash.GetUniqueId();
 }