示例#1
0
        /// <summary>
        /// Loads information from session and sets them. If session doesn't contain required information, sets default
        /// values instead.
        /// </summary>
        private void GetInfoFromSession()
        {
            var sessionContents = new SessionContents(HttpContext.Session);

            ModuleInfos = sessionContents.GetSessionContents <ModuleInfo>(SessionConstants.MODULE_INFOS_SESSION_KEY);
            AxiomInfos  = sessionContents.GetSessionContents <AxiomInfo>(SessionConstants.AXIOM_INFOS_SESSION_KEY);
            RuleInfos   = sessionContents.GetSessionContents <RuleInfo>(SessionConstants.RULE_INFOS_SESSION_KEY);
        }
示例#2
0
        private void GetSessionInfo()
        {
            var sessionContents = new SessionContents(HttpContext.Session);

            var modules = sessionContents.GetSessionContents <ModuleInfo>(SessionConstants.MODULE_INFOS_SESSION_KEY);

            _modules = new Dictionary <string, ModuleInfo>();
            foreach (var module in modules)
            {
                _modules.Add(module.ModuleName, module);
            }

            _axiom = sessionContents.GetSessionContents <AxiomInfo>(SessionConstants.AXIOM_INFOS_SESSION_KEY);
            _rules = sessionContents.GetSessionContents <RuleInfo>(SessionConstants.RULE_INFOS_SESSION_KEY);
        }