Method ReadUsersAsync
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
ReadUsersAsync(int, CancellationToken)
Reads the users this deployment holds, at most as many as asked for.
Task<IReadOnlyList<UserRecord>> ReadUsersAsync(int limit, CancellationToken cancellationToken)
Parameters
limitintThe greatest number of users to read.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<UserRecord>>
The users, in a stable order, and no more than
limitof them.
Remarks
The bound is the caller's, and it exists so that a caller asking whether anybody is recorded at all reads as few rows as that question needs rather than every user. The order is stable so that a caller asking for one user twice is answered about the same user both times.
Exceptions
- ArgumentOutOfRangeException
Thrown when
limitis not positive.