Add support for indeterminate progress

This commit also changes the behavior of ProgressContext.IsFinished.
Only tasks that have been started will be taken into consideration,
and not indeterminate tasks.

Closes #329
Closes #331
This commit is contained in:
Patrik Svensson
2021-04-02 18:41:25 +02:00
committed by Phil Scott
parent 6121203fee
commit 6f16081f42
15 changed files with 196 additions and 42 deletions

View File

@ -62,7 +62,7 @@ namespace Spectre.Console
_stopwatch.Start();
}
var renderContext = new RenderContext(_console.Profile.Capabilities);
var renderContext = new RenderContext(_console.Profile.ColorSystem, _console.Profile.Capabilities);
var delta = _stopwatch.Elapsed - _lastUpdate;
_lastUpdate = _stopwatch.Elapsed;