...
Example of usage by the SDK
The SDK uses IAsyncEnumerable<>
interface to process the requests for each page asynchronously.
Code Block | ||
---|---|---|
| ||
var entitiesCount = 0; var pageCount = 0; var service = provider.GetRequiredService<IBfsLegalEntitiesService>(); await foreach (var response in service.GetLegalEntitiesInPagesAsync(new GetPersonArgs())) { entitiesCount += response.Result.Length; pageCount++; foreach (var entity in response.Result) { ProcessEntity(entity); } } |
...