public string ToPlatString(int sessionMode) { if (sessionMode == (int)EnumPlatSessionMode.Session) { return(this.SessionKey); } return(PlatSessionUtil.ToCookieString(this)); }
public override IPlatSessionData InitSession(string colUid, params string[] colArgs) { var session = new WyxSessionInfo(); PlatSessionUtil.InitSession(session, WyxSessionInfo.COLUid, WyxSessionInfo.ALLKeys); session.FromCollection(HttpContext.Current.Request.QueryString, false, WyxSessionInfo.ALLKeys); return(session); }
public string ToPlatString(int sessionMode) { if (sessionMode == (int)EnumPlatSessionMode.Session) { return(this.SessionKey); } this.AuthArgs = "uid=" + this.Uid + "&" + this.AuthArgs; return(PlatSessionUtil.ToCookieString(this)); }
public bool FromPlatString(string platStr, int sessionMode) { if (string.IsNullOrEmpty(platStr)) { return(false); } if (sessionMode == (int)EnumPlatSessionMode.Session) { return(FromSessionKey(platStr)); } PlatSessionUtil.FromCookieString(this, platStr); this.FromCollection(HttpUtility.ParseQueryString(this.AuthArgs), false); return(true); }
public override IPlatSessionData InitSession(string colUid, params string[] colArgs) { var session = new WanwanSessionInfo(); PlatSessionUtil.InitSession(session, WanwanSessionInfo.COLUid, WanwanSessionInfo.ALLKeys); session.FromCollection(HttpContext.Current.Request.QueryString, false, WanwanSessionInfo.ALLKeys); if (string.IsNullOrEmpty(session.Uid)) { if (null != HttpContext.Current.Session) { var obj = HttpContext.Current.Session[WanwanSessionInfo.COLUid]; if (null != obj) { session.Uid = obj.ToString(); HttpContext.Current.Session[WanwanSessionInfo.COLUid] = null; } } } return(session); }