using System.Linq.Expressions; namespace ZeroFramework.DeviceCenter.Domain.Repositories { public interface IAsyncQueryableProvider { bool CanExecute(IQueryable queryable); #region Contains Task ContainsAsync(IQueryable queryable, T item, CancellationToken cancellationToken = default); #endregion #region Any/All Task AnyAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); Task AllAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); #endregion #region Count/LongCount Task CountAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task CountAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); Task LongCountAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task LongCountAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); #endregion #region First/FirstOrDefault Task FirstAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task FirstAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); Task FirstOrDefaultAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task FirstOrDefaultAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); #endregion #region Last/LastOrDefault Task LastAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task LastAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); Task LastOrDefaultAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task LastOrDefaultAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); #endregion #region Single/SingleOrDefault Task SingleAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task SingleAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); Task SingleOrDefaultAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task SingleOrDefaultAsync(IQueryable queryable, Expression> predicate, CancellationToken cancellationToken = default); #endregion #region Min Task MinAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task MinAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); #endregion #region Max Task MaxAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task MaxAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); #endregion #region Sum Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable source, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task SumAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); #endregion #region Average Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable source, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); Task AverageAsync(IQueryable queryable, Expression> selector, CancellationToken cancellationToken = default); #endregion #region ToList/Array Task> ToListAsync(IQueryable queryable, CancellationToken cancellationToken = default); Task ToArrayAsync(IQueryable queryable, CancellationToken cancellationToken = default); #endregion } }