Progress

Represents a task list.

Represents a task list.

Properties

AutoClear : bool

Gets or sets a value indicating whether or not the task list should be cleared once it completes. Defaults to false.

AutoRefresh : bool

Gets or sets a value indicating whether or not task list should auto refresh. Defaults to true.

ExcludeVerticalPadding : bool

Gets or sets a value indicating whether or not to exclude the vertical padding in the display. Defaults to false.

HideCompleted : bool

Gets or sets a value indicating whether or not the task list should only include tasks not completed Defaults to false.

RefreshRate : TimeSpan

Gets or sets the refresh rate if AutoRefresh is enabled. Defaults to 10 times/second.

RenderHook : Func<IRenderable, IReadOnlyList<ProgressTask>, IRenderable>

Gets or sets a optional custom render function.

Methods

public void Start(Action<ProgressContext> action)

Starts the progress task list.

Parameters:

action (Action<ProgressContext>)
The action to execute.
public T Start<T>(Func<ProgressContext, T> func)

Starts the progress task list and returns a result.

Parameters:

func (Func<ProgressContext, T>)
he action to execute.

Returns:

The result.

public Task StartAsync(Func<ProgressContext, Task> action)

Starts the progress task list.

Parameters:

action (Func<ProgressContext, Task>)
The action to execute.

Returns:

A Task representing the asynchronous operation.

public Task<T> StartAsync<T>(Func<ProgressContext, Task<T>> action)

Starts the progress task list and returns a result.

Parameters:

action (Func<ProgressContext, Task<T>>)
The action to execute.

Returns:

A Task representing the asynchronous operation.

Extension Methods

Progress AutoClear(this Progress progress, bool enabled)

Sets whether or not auto clear is enabled. If enabled, the task tabled will be removed once all tasks have completed.

Returns:

The same instance so that multiple calls can be chained.

Progress AutoRefresh(this Progress progress, bool enabled)

Sets whether or not auto refresh is enabled. If disabled, you will manually have to refresh the progress.

Returns:

The same instance so that multiple calls can be chained.

Progress Columns(this Progress progress, ProgressColumn[] columns)

Sets the columns to be used for an Progress instance.

Returns:

The same instance so that multiple calls can be chained.

Progress ExcludeVerticalPadding(this Progress progress)

Excludes the vertical padding in the display.

Returns:

The same instance so that multiple calls can be chained.

Progress ExcludeVerticalPadding(this Progress progress, bool enabled)

Sets whether or not to exclude the vertical padding in the display. If enabled, the progress display will not include vertical padding.

Returns:

The same instance so that multiple calls can be chained.

Progress HideCompleted(this Progress progress, bool enabled)

Sets whether or not hide completed is enabled. If enabled, the task tabled will be removed once it is completed.

Returns:

The same instance so that multiple calls can be chained.

Progress IncludeVerticalPadding(this Progress progress)

Includes the vertical padding in the display.

Returns:

The same instance so that multiple calls can be chained.

Progress UseRenderHook(this Progress progress, Func<IRenderable, IReadOnlyList<ProgressTask>, IRenderable> renderHook)

Sets an optional hook to intercept rendering.

Returns:

The same instance so that multiple calls can be chained.