示例#1
0
        public ReadOnlyCollection <Comment> GetComments(out int count, PhotoGetCommentsParams @params)
        {
            var response = _vk.Call("photos.getComments", @params);

            count = response["count"];
            return(response["items"].ToReadOnlyCollectionOf <Comment>(x => x));
        }
示例#2
0
        public ReadOnlyCollection <Comment> GetComments(out int count, PhotoGetCommentsParams @params)
        {
            var response = GetComments(@params);

            count = Convert.ToInt32(response.TotalCount);

            return(response.ToReadOnlyCollection());
        }
示例#3
0
 /// <inheritdoc />
 public async Task <VkCollection <Comment> > GetCommentsAsync(PhotoGetCommentsParams @params)
 {
     return(await TypeHelper.TryInvokeMethodAsync(() => _vk.Photo.GetComments(@params)));
 }
示例#4
0
文件: PhotoCategory.cs 项目: vknet/vk
 /// <summary>
 /// Возвращает список комментариев к фотографии.
 /// </summary>
 /// <param name="params">Параметры запроса.</param>
 /// <returns>
 /// После успешного выполнения возвращает список объектов <see cref="Comment" />.
 /// </returns>
 /// <remarks>
 /// Страница документации ВКонтакте <see href="http://vk.com/dev/photos.getComments" />.
 /// </remarks>
 public VkCollection<Comment> GetComments(PhotoGetCommentsParams @params)
 {
     return _vk.Call("photos.getComments", @params).ToVkCollectionOf<Comment>(x => x);
 }
示例#5
0
 /// <inheritdoc />
 public Task <VkCollection <Comment> > GetCommentsAsync(PhotoGetCommentsParams @params)
 {
     return(TypeHelper.TryInvokeMethodAsync(func: () => GetComments(@params: @params)));
 }