コード例 #1
0
        protected override async Task MapBeforeCacheAsync(IList <T> cached)
        {
            foreach (var activity in cached)
            {
                var entity = activity;
                entity.GroupId = await _groupActivityService.GetGroupIdAsync(activity.Id);

                await _commentsService.FillCommentsAsync(entity);

                await _likesService.FillLikesAsync(entity);
                await FillLinkPreviewAsync(entity);
            }
        }
コード例 #2
0
ファイル: NewsService.cs プロジェクト: umbracouser7/Uintra
        protected override async Task MapBeforeCacheAsync(IList <Entities.News> cached)
        {
            foreach (var activity in cached)
            {
                var entity = activity;
                entity.Location = await _activityLocationService.GetAsync(entity.Id);

                entity.GroupId = await _groupActivityService.GetGroupIdAsync(activity.Id);

                await _commentsService.FillCommentsAsync(entity);

                await _likesService.FillLikesAsync(entity);
            }
        }
コード例 #3
0
        protected override async Task MapBeforeCacheAsync(IList <Event> cached)
        {
            foreach (var activity in cached)
            {
                var entity = activity;
                entity.GroupId = await _groupActivityService.GetGroupIdAsync(activity.Id);

                _subscribeService.FillSubscribers(entity);
                await _commentsService.FillCommentsAsync(entity);

                await _likesService.FillLikesAsync(entity);

                _activitySubscribeSettingService.FillSubscribeSettings(entity);
            }
        }