static async Task RunAsync(QueryProvider provider, CancellationToken cancellationToken = default) { WriteTitle(provider.ToString()); WriteLine($"Count AB: {Count(provider, "AB")}"); var indicator = new LoadIndicator(); indicator.Start(); RowCollection?table = Load(provider, "AB"); indicator.Stop(); WriteTable(table); PressAnyKey(); WriteLine($"Count PQ: {await CountAsync(provider, "PQ").ConfigureAwait(false)}"); indicator.Start(); table = await LoadAsync(provider, "PQ", cancellationToken).ConfigureAwait(false); indicator.Stop(); WriteTable(table); PressAnyKey(); }
protected static void DemoLoadIndicator() { CoEx.WriteTitleLarge("Loading indicator"); CoEx.WriteLine(); LoadIndicator indicator = new LoadIndicator() { Message = "Load the awesomeness" }; indicator.Start(); System.Threading.Thread.Sleep(5000); indicator.Stop(); }