コード例 #1
0
        /// <summary>
        ///     Gets all reaction for a vlog.
        /// </summary>
        /// <param name="vlogId">The vlog of the reactions.</param>
        /// <param name="navigation">Navigation control.</param>
        /// <returns>All vlog reactions.</returns>
        public async IAsyncEnumerable <Reaction> GetForVlogAsync(Guid vlogId, Navigation navigation)
        {
            await foreach (var reaction in _reactionRepository.GetForVlogAsync(vlogId, navigation))
            {
                reaction.ThumbnailUri = await _entityStorageUriService.GetReactionThumbnailAccessUriAsync(reaction.Id);

                reaction.VideoUri = await _entityStorageUriService.GetReactionVideoAccessUriAsync(reaction.Id);

                yield return(reaction);
            }
        }