public static LogicSessionType ToLogicSessionType(this string value) { LogicSessionType logicSessionType = LogicSessionType.N; string a = value.ToUpper(); if (!(a == "C")) { if (!(a == "S")) { if (a == "N") { logicSessionType = LogicSessionType.N; } } else { logicSessionType = LogicSessionType.S; } } else { logicSessionType = LogicSessionType.C; } return(logicSessionType); }
internal LogicSession(string userId, LogicSessionType sessionType) { this._lockObj = new object(); this.UserId = userId; this.LoginTime = AppRuntime.ServerDateTime; this.LoginType = sessionType; this.SessionId = Sys.Gen24BitGuid(); this.LastRequestTime = this.LoginTime; this.LastRefreshTime = this.LoginTime; this.UpdateTime = this.LoginTime; this.RewriteAuthTime = this.LoginTime; this.Ignore = false; this.TmpID = new Random().Next(); }