IAsyncEnumerable.cs 769 B

1234567891011121314151617181920212223
  1. // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
  2. using System;
  3. namespace System.Collections.Generic
  4. {
  5. /// <summary>
  6. /// Asynchronous version of the IEnumerable&lt;T&gt; interface, allowing elements of the
  7. /// enumerable sequence to be retrieved asynchronously.
  8. /// </summary>
  9. /// <typeparam name="T">Element type.</typeparam>
  10. public interface IAsyncEnumerable<
  11. #if !NO_VARIANCE
  12. out
  13. #endif
  14. T>
  15. {
  16. /// <summary>
  17. /// Gets an asynchronous enumerator over the sequence.
  18. /// </summary>
  19. /// <returns>Enumerator for asynchronous enumeration over the sequence.</returns>
  20. IAsyncEnumerator<T> GetEnumerator();
  21. }
  22. }