IAsyncEnumerable.cs 847 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. namespace System.Collections.Generic
  6. {
  7. /// <summary>
  8. /// Asynchronous version of the IEnumerable&lt;T&gt; interface, allowing elements of the
  9. /// enumerable sequence to be retrieved asynchronously.
  10. /// </summary>
  11. /// <typeparam name="T">Element type.</typeparam>
  12. public interface IAsyncEnumerable<
  13. #if !NO_VARIANCE
  14. out
  15. #endif
  16. T>
  17. {
  18. /// <summary>
  19. /// Gets an asynchronous enumerator over the sequence.
  20. /// </summary>
  21. /// <returns>Enumerator for asynchronous enumeration over the sequence.</returns>
  22. IAsyncEnumerator<T> GetEnumerator();
  23. }
  24. }