// 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; using System.Threading; using System.Threading.Tasks; namespace System.Linq { internal partial class AsyncIteratorBase { public virtual IAsyncEnumerable Select(Func selector) { return new AsyncEnumerable.SelectEnumerableAsyncIterator(this, selector); } public virtual IAsyncEnumerable Select(Func> selector) { return new AsyncEnumerable.SelectEnumerableAsyncIteratorWithTask(this, selector); } #if !NO_DEEP_CANCELLATION public virtual IAsyncEnumerable Select(Func> selector) { return new AsyncEnumerable.SelectEnumerableAsyncIteratorWithTaskAndCancellation(this, selector); } #endif public virtual IAsyncEnumerable Where(Func predicate) { return new AsyncEnumerable.WhereEnumerableAsyncIterator(this, predicate); } public virtual IAsyncEnumerable Where(Func> predicate) { return new AsyncEnumerable.WhereEnumerableAsyncIteratorWithTask(this, predicate); } #if !NO_DEEP_CANCELLATION public virtual IAsyncEnumerable Where(Func> predicate) { return new AsyncEnumerable.WhereEnumerableAsyncIteratorWithTaskAndCancellation(this, predicate); } #endif } }