AsAsyncEnumerable.cs 1.0 KB

12345678910111213141516171819202122
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT License.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Collections.Generic;
  5. namespace System.Linq
  6. {
  7. public static partial class AsyncEnumerable
  8. {
  9. // NB: Synchronous LINQ to Objects doesn't hide the implementation of the source either.
  10. /// <summary>
  11. /// Hides the identity of an async-enumerable sequence.
  12. /// </summary>
  13. /// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
  14. /// <param name="source">An async-enumerable sequence whose identity to hide.</param>
  15. /// <returns>An async-enumerable sequence that hides the identity of the source sequence.</returns>
  16. /// <exception cref="ArgumentNullException"><paramref name="source"/> is null.</exception>
  17. public static IAsyncEnumerable<TSource> AsAsyncEnumerable<TSource>(this IAsyncEnumerable<TSource> source) => source;
  18. }
  19. }