braintree_dotnet
braintree_dotnet copied to clipboard
Have ResourceCollection<T> implement IAsyncEnumerable
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 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 😄
For internal notekeeping - ticket number 1613