Exemplo n.º 1
0
 public WidgetUtil(IOptionsSnapshot <DataSettingsModel> dataSettings, RatingUtil ratingUtil, MessageUtil msgUtil, IHttpContextAccessor contextAccessor)
 {
     _dataSettings    = dataSettings.Value;
     _ratingUtil      = ratingUtil;
     _msgUtil         = msgUtil;
     _contextAccessor = contextAccessor;
 }
Exemplo n.º 2
0
        public void PrepareListCache(IEnumerable <Blog> list)
        {
            if (list == null || list.Count() == 0)
            {
                return;
            }
            var blogIds = list.Select(b => b.BlogID);

            _visitCounter.PrepareBlogVisits(blogIds);
            PreparePostCount(blogIds);
            RatingUtil.PrepareRatings(_cache, _db, blogIds);
            GetNickNames(list.Select(b => b.Author));
        }