/// <summary> /// 根据会话ID获取会话对象 /// </summary> /// <param name="SessionID"></param> /// <returns></returns> public IUserSession <T> GetUserSession(Guid SessionID) { if (Options.IsSqlSaveCookie) { return(null); } else { KeyValuePair <string, object> item = UserSessions.First(p => ((IUserSession <T>)(p.Value)).SessionID == SessionID); if (item.IsNotNull()) { return(item.Value as IUserSession <T>); } else { return(null); } } }