/// <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); }
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); }