Exemplo n.º 1
0
        static void WarmUpManagers(VBThreadManager threadManager, VBSessionManager sessionManager, VBSettingsManager settingsManager, VBForumManager forumManager, VBUserManager userManager, VBThread thread, VBUser user, VBSession session)
        {
            var managerThread = threadManager.GetThreadAsync(thread.Id, writeable: true).Result;
            var replys        = threadManager.GetReplysAsync(thread.Id, start: 0, count: 1).Result;
            var settings      = settingsManager.GetCommonSettings();

            if (session != null)
            {
                // Do not update last activity since we're not in a http context => No request path avaliable
                var managerSession = sessionManager.GetAsync(session.SessionHash, updateLastActivity: false).Result;
            }

            if (user != null)
            {
                var forum = forumManager.GetCategoriesWhereUserCanAsync(user.UserGroup).Result;
                var randomUserFromManager = userManager.GetUserAsync(user.Id).Result;
            }
        }
        public IActionResult Index()
        {
            var settings = settingsManager.GetCommonSettings();

            return(View(settings));
        }