Exemplo n.º 1
0
        public WebAppContext GetAppContext(AppKeySetting appSettings, HttpContext context)
        {
            var sessionHelper   = new SessionHelper(context);
            var stackAppContext = new WebAppContext(sessionHelper);

            stackAppContext.Init(appSettings);
            var str = context.Session.GetString("USER_CONTEXT");

            if (!string.IsNullOrEmpty(str))
            {
                var userCntxt = JsonConvert.DeserializeObject <UserContext>(str);

                stackAppContext.UserInfo = userCntxt;
            }

            return(stackAppContext);
        }