Пример #1
0
 /// <summary>
 /// Gets <see cref="IAsyncEnumerable{T}"/> for current query.
 /// </summary>
 /// <param name="cancellationToken">Cancellation token.</param>
 /// <returns>Query result as <see cref="IAsyncEnumerable{T}"/>.</returns>
 public IAsyncEnumerator <T> GetAsyncEnumerator(CancellationToken cancellationToken)
 {
     return(QueryProvider.ExecuteAsyncEnumerable <T>(Expression, cancellationToken).Result.GetAsyncEnumerator(cancellationToken));
 }
Пример #2
0
 /// <summary>
 /// Executes query expression and returns result as <see cref="IAsyncEnumerable{T}"/> value.
 /// </summary>
 /// <typeparam name="TResult">Type of result element.</typeparam>
 /// <param name="expression">Query expression.</param>
 /// <param name="cancellationToken">Cancellation token.</param>
 /// <returns>Query result as <see cref="IAsyncEnumerable{T}"/>.</returns>
 public Task <IAsyncEnumerable <TResult> > ExecuteAsyncEnumerable <TResult>(Expression expression, CancellationToken cancellationToken)
 {
     return(QueryProvider.ExecuteAsyncEnumerable <TResult>(expression, cancellationToken));
 }