Beispiel #1
0
 public WanwanClient(string uri, WyxWebArgs getArgs = null, WyxWebArgs postArgs = null)
     : base(uri, getArgs, postArgs)
 {
     this._baseUri      = GetApiJsonUrl(uri);
     this._session      = WanwanSessionProvider.Instance.LoadWanwanSession();
     this.NoSesssionKey = false;
     this.Timeout       = 3000;
 }
        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);
        }