private async Task Sort(ISortable sortable, IGeneratorItems generatorItems, int amount, IProgress <SortingCore.Services.TimeWatchSortable.TimeAndValue> p, CancellationTokenSource cts) { SortingCore.Services.TimeWatchSortable timeWatchSortable = new SortingCore.Services.TimeWatchSortable(); timeWatchSortable.SetProgress(p); timeWatchSortable.SetSortable(sortable); List <int> list = generatorItems.GetData(amount); timeWatchSortable.Start(); await Task.Run(() => sortable.SortAscending(list)); }
private static List <int> OrderAsc(ISortable sortable, List <int> list) { return(sortable.SortAscending(list)); }