public static SessionInfo NewSession(LIdentity ID) { Random rnd = new Random(); SessionInfo info = new SessionInfo(); info.Identity = ID; info.Created = DateTime.Now; info.Expires = DateTime.Now.AddHours(1); string sessionkey = Guid.NewGuid().ToString(); while(Sessions.ContainsKey(sessionkey)) sessionkey = Guid.NewGuid().ToString(); info.SessionKey = sessionkey; Sessions[info.SessionKey] = info; return info; }
public SessionInfo NewSession(LIdentity ID) { Random rnd = new Random(); SessionInfo info = new SessionInfo(); info.Identity = ID; info.Created = DateTime.Now; info.Expires = DateTime.Now.AddHours(1); string sessionkey = Guid.NewGuid().ToString(); while(Sessions.ContainsKey(sessionkey)) sessionkey = Guid.NewGuid().ToString(); info.SessionKey = sessionkey; Sessions[info.SessionKey] = info; SaveSession(info.SessionKey); FDebugLog.WriteLog("New Session : " + ID.UserLRI + " ("+sessionkey+")"); return info; }