Progress Class

Represents a task list.
public sealed class Progress
Namespace
Spectre.Console

Constructors

Progress(IAnsiConsole)
Initializes a new instance of the Progress class.

Properties

bool AutoClear
Gets or sets a value indicating whether or not the task list should be cleared once it completes. Defaults to false.
bool AutoRefresh
Gets or sets a value indicating whether or not task list should auto refresh. Defaults to true.
bool HideCompleted
Gets or sets a value indicating whether or not the task list should only include tasks not completed Defaults to false.
TimeSpan RefreshRate
Gets or sets the refresh rate if AutoRefresh is enabled. Defaults to 10 times/second.
Func<IRenderable, IReadOnlyList<ProgressTask>, IRenderable> RenderHook
Gets or sets a optional custom render function.

Methods

void Start(Action<ProgressContext>)
Starts the progress task list.
T Start<T>(Func<ProgressContext, T>)
Starts the progress task list and returns a result.
Task StartAsync(Func<ProgressContext, Task>)
Starts the progress task list.
Task<T> StartAsync<T>(Func<ProgressContext, Task<T>>)
Starts the progress task list and returns a result.

Extension Methods

Progress AutoClear(bool)
Sets whether or not auto clear is enabled. If enabled, the task tabled will be removed once all tasks have completed.
Progress AutoRefresh(bool)
Sets whether or not auto refresh is enabled. If disabled, you will manually have to refresh the progress.
Progress Columns(ProgressColumn[])
Sets the columns to be used for an Progress instance.
Progress HideCompleted(bool)
Sets whether or not hide completed is enabled. If enabled, the task tabled will be removed once it is completed.
Progress UseRenderHook(Func<IRenderable, IReadOnlyList<ProgressTask>, IRenderable>)
Sets an optional hook to intercept rendering.