Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example of usage by the SDK

The SDK uses IAsyncEnumerable<> interface to process the requests for each page asynchronously.

Code Block
languagec#
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);
  }
}

...