// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT License. // See the LICENSE file in the project root for more information. using System.Collections.Generic; namespace System.Linq { public static partial class AsyncEnumerableEx { /// /// Projects each element of the source async-enumerable sequence to the other async-enumerable sequence and merges the resulting async-enumerable sequences into one async-enumerable sequence. /// /// The type of the elements in the source sequence. /// The type of the elements in the other sequence and the elements in the result sequence. /// An async-enumerable sequence of elements to project. /// An async-enumerable sequence to project each element from the source sequence onto. /// An async-enumerable sequence whose elements are the result of projecting each source element onto the other sequence and merging all the resulting sequences together. /// or is null. public static IAsyncEnumerable SelectMany(this IAsyncEnumerable source, IAsyncEnumerable other) { if (source == null) throw Error.ArgumentNull(nameof(source)); if (other == null) throw Error.ArgumentNull(nameof(other)); return source.SelectMany(_ => other); } } }