public static string CreateNewSession() { string strRet = HashUtil.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 User() { this.Id = HashUtil.GetUniqueId(); }
public EdgeDevice(string deviceId) { this.Id = HashUtil.GetUniqueId(); this.DeviceId = deviceId; this.DeviceName = deviceId; }
public EdgeDevice() { this.Id = HashUtil.GetUniqueId(); }