I'm getting an issue where the console interface is not being updated until the function ends, or I call Thread.Sleep()
const int totalTicks = 10;
var options = new ProgressBarOptions
{
ProgressCharacter = '─',
ProgressBarOnBottom = true,
};
using (var pbar = new ProgressBar(totalTicks, "Initial message", options))
{
pbar.Tick(); //will advance pbar to 1 out of 10.
//we can also advance and update the progressbar text
pbar.Tick("Step 2 of 10");
pbar.Tick("Step 3 of 10");
Thread.Sleep(1000);
pbar.Tick("Step 4 of 10");
pbar.Tick("Step 5 of 10");
Thread.Sleep(1000);
pbar.Tick("Step 6 of 10");
pbar.Tick("Step 7 of 10");
pbar.Tick("Step 8 of 10");
Thread.Sleep(1000);
pbar.Tick("Step 9 of 10");
pbar.Tick("Step 10 of 10");
}
When running the application with, or without breakpoints, the interface is only updated after Thread.Sleep(), or once the function returns..
I'm getting an issue where the console interface is not being updated until the function ends, or I call
Thread.Sleep()
When running the application with, or without breakpoints, the interface is only updated after
Thread.Sleep()
, or once the function returns..