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)); }
public ReadOnlyCollection <Comment> GetComments(out int count, PhotoGetCommentsParams @params) { var response = GetComments(@params); count = Convert.ToInt32(response.TotalCount); return(response.ToReadOnlyCollection()); }
/// <inheritdoc /> public async Task <VkCollection <Comment> > GetCommentsAsync(PhotoGetCommentsParams @params) { return(await TypeHelper.TryInvokeMethodAsync(() => _vk.Photo.GetComments(@params))); }
/// <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); }
/// <inheritdoc /> public Task <VkCollection <Comment> > GetCommentsAsync(PhotoGetCommentsParams @params) { return(TypeHelper.TryInvokeMethodAsync(func: () => GetComments(@params: @params))); }