braintree_dotnet icon indicating copy to clipboard operation
braintree_dotnet copied to clipboard

Have ResourceCollection<T> implement IAsyncEnumerable

Open richardszalay opened this issue 4 years ago • 2 comments

General information

  • SDK/Library version: 5.2.0
  • Environment: (Development)
  • Language, language version, and OS: C# 8 / .NET Core 3.1

Issue description

ResourceCollection<T> implements IEnumerable<T>, but this requires the use of blocking IO in the *Gateway classes. Implementing IAsyncEnumerable would allow enumeration to be non-blocking.

richardszalay avatar Nov 19 '20 03:11 richardszalay

👋 @richardszalay thanks for the suggestion! It doesn't look like IAsyncEnumerable is available for .NET framework versions lower than 5.0, so we'd need to add some preprocessor directives to make sure we're still supporting older versions (we target Net Framework 4.5.2 and Net Standard 2.0).

If you'd like to submit a PR that implements this, please go for it 😄

hollabaq86 avatar Nov 19 '20 15:11 hollabaq86

For internal notekeeping - ticket number 1613

hollabaq86 avatar May 02 '22 19:05 hollabaq86