// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. using System.Linq.Expressions; using System.Threading; using System.Threading.Tasks; namespace System.Linq { /// /// Represents a query provider for asynchronous enumerable sequences. /// public interface IAsyncQueryProvider { /// /// Creates a new asynchronous enumerable sequence represented by an expression tree. /// /// The type of the elements in the sequence. /// The expression tree representing the asynchronous enumerable sequence. /// Asynchronous enumerable sequence represented by the specified expression tree. IAsyncQueryable CreateQuery(Expression expression); /// /// Executes an expression tree representing a computation over asynchronous enumerable sequences. /// /// The type of the result of evaluating the expression tree. /// The expression tree to evaluate. /// Cancellation token used to cancel the evaluation. /// Task representing the result of evaluating the specified expression tree. ValueTask ExecuteAsync(Expression expression, CancellationToken token); } }