braintree / braintree_dotnet

Braintree .NET library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
136 stars 73 forks source link

Have ResourceCollection<T> implement IAsyncEnumerable #105

Open richardszalay opened 4 years ago

richardszalay commented 4 years ago

General information

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.

hollabaq86 commented 4 years ago

👋 @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 commented 2 years ago

For internal notekeeping - ticket number 1613