Beispiel #1
0
        public ReadOnlyCollection <Comment> GetAllComments(out int count, PhotoGetAllCommentsParams @params)
        {
            var response = _vk.Call("photos.getAllComments", @params);

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

            count = Convert.ToInt32(response.TotalCount);

            return(response.ToReadOnlyCollection());
        }
Beispiel #3
0
 /// <inheritdoc />
 public async Task <VkCollection <Comment> > GetAllCommentsAsync(PhotoGetAllCommentsParams @params)
 {
     return(await TypeHelper.TryInvokeMethodAsync(() => _vk.Photo.GetAllComments(@params)));
 }
Beispiel #4
0
 /// <summary>
 /// Возвращает отсортированный в антихронологическом порядке список всех комментариев к конкретному альбому или ко всем альбомам пользователя.
 /// </summary>
 /// <param name="params">Параметры запроса.</param>
 /// <returns>
 /// После успешного выполнения возвращает список объектов <see cref="Comment" />.
 /// </returns>
 /// <remarks>
 /// Страница документации ВКонтакте <see href="http://vk.com/dev/photos.getAllComments" />.
 /// </remarks>
 public VkCollection<Comment> GetAllComments(PhotoGetAllCommentsParams @params)
 {
     return _vk.Call("photos.getAllComments", @params).ToVkCollectionOf<Comment>(x => x);
 }
Beispiel #5
0
 /// <inheritdoc />
 public Task <VkCollection <Comment> > GetAllCommentsAsync(PhotoGetAllCommentsParams @params)
 {
     return(TypeHelper.TryInvokeMethodAsync(func: () => GetAllComments(@params: @params)));
 }