Пример #1
0
        protected override async Task <RateLimitDescription> Execute(CancellationToken token)
        {
            long listId;

            if (_listId == null)
            {
                // get description (not required to receive, but important operation)
                var list = await ListProxy.GetOrReceiveListDescription(_accessor, _list);

                _listId = listId = list.Id;
            }
            else
            {
                listId = _listId.Value;
            }
            var idParam = new ListParameter(listId);
            var result  = await RetrieveCursoredResult(_accessor,
                                                       (a, i) => a.GetListMembersAsync(idParam, i, token), CallExceptionHandler, token)
                          .ConfigureAwait(false);

            _usersHandler(result.Result);
            CallHandler(result.Result.Select(u => u.Id));
            return(result.RateLimit);
        }