IAsyncEnumerable.cs 909 B

12345678910111213141516171819202122232425
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the Apache 2.0 License.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Threading.Tasks;
  8. namespace System.Collections.Generic
  9. {
  10. /// <summary>
  11. /// Asynchronous version of the IEnumerable&lt;T&gt; interface, allowing elements of the
  12. /// enumerable sequence to be retrieved asynchronously.
  13. /// </summary>
  14. /// <typeparam name="T">Element type.</typeparam>
  15. public interface IAsyncEnumerable<out T>
  16. {
  17. /// <summary>
  18. /// Gets an asynchronous enumerator over the sequence.
  19. /// </summary>
  20. /// <returns>Enumerator for asynchronous enumeration over the sequence.</returns>
  21. IAsyncEnumerator<T> GetEnumerator();
  22. }
  23. }