internal DataTableSource(DataTableProcess <TEntity> process, ReadData <TEntity> read, IReadOnlyList <ColumnRenderInfo <TEntity> > cols) { _process = process; _read = read; Cols = cols; Sorter = new QuerySort <TEntity>(); foreach (var col in cols) { col.AddToSorter(Sorter); } _process.ReadDataAsync = new ReadDataAsync( async(int page, int pageSize) => { Result = await _read(new ReadDataRequest <TEntity>(this, page, pageSize)); }); }
public abstract void AddToSorter(QuerySort <TEntity> sorter);