Created
December 4, 2018 16:57
-
-
Save richlander/224803ce366bb653b6a1801e2b67f241 to your computer and use it in GitHub Desktop.
Using IAsyncEnumerable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async IAsyncEnumerable<int> GetBigResultsAsync() | |
{ | |
await foreach (var result in GetResultsAsync()) | |
{ | |
if (result > 20) yield return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
//The following is my full implementation of GetResultsAsync() method
![Capture](https://user-images.githubusercontent.com/8474855/63399197-5a242980-c3bf-11e9-902c-c67edea85125.JPG)
//as well as how to consume GetBigResultsAsync() method from main() with testable code as follows