// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license 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.
Task ExecuteAsync(Expression expression, CancellationToken token);
}
}