IDynamicGridDataComponent.cs 832 B

12345678910111213141516171819202122232425262728293031323334
  1. using InABox.Clients;
  2. using InABox.Core;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading;
  8. using System.Threading.Tasks;
  9. namespace InABox.DynamicGrid;
  10. public interface IDynamicGridDataComponent<T>
  11. where T : BaseObject, new()
  12. {
  13. DynamicGrid<T> Grid { get; set; }
  14. /// <summary>
  15. /// Do any required updates when the options list is changed.
  16. /// </summary>
  17. /// <returns>Whether the columns need to be reloaded.</returns>
  18. bool OptionsChanged();
  19. void Reload(Filters<T> criteria, Columns<T> columns, SortOrder<T>? sort, CancellationToken token, Action<QueryResult> action);
  20. T LoadItem(CoreRow row);
  21. T[] LoadItems(CoreRow[] rows);
  22. void SaveItem(T item);
  23. void SaveItems(T[] items);
  24. void DeleteItems(CoreRow[] rows);
  25. }