コード例 #1
0
 public static async Task <List <ApplicationUser> > ListUsersAsync(
     this IUserRetrievalService userRetrievalService)
 {
     return((await PageReader <ApplicationUser> .ReadAllAsync(
                 (offset, limit, token) => userRetrievalService
                 .ListUsers(new UserListRequest
     {
         Limit = limit,
         Offset = offset
     }, UserRetrievalOptions.Default, token)))
            .ToList());
 }
コード例 #2
0
 public static async Task <List <EventInfo> > GetPastEventsAsync(
     this IEventInfoRetrievalService service,
     EventInfoFilter filter              = null,
     EventInfoRetrievalOptions options   = null,
     CancellationToken cancellationToken = default)
 {
     return((await PageReader <EventInfo> .ReadAllAsync((offset, limit, token) =>
                                                        service.ListEventsAsync(new EventListRequest(offset, limit)
     {
         Filter = EventInfoFilter.PastEvents(filter)
     }, options, token), cancellationToken))
            .ToList());
 }