ProgressContext

Represents a context that can be used to interact with a .

Represents a context that can be used to interact with a Progress.

Properties

IsFinished : bool

Gets a value indicating whether or not all started tasks have completed.

Methods

public ProgressTask AddTask(string description, bool autoStart = true, double maxValue = 100)

Adds a task.

Parameters:

description (string)
The task description.
autoStart (bool)
Whether or not the task should start immediately.
maxValue (double)
The task's max value.

Returns:

The newly created task.

public ProgressTask AddTask(string description, ProgressTaskSettings settings)

Adds a task.

Parameters:

description (string)
The task description.
settings (ProgressTaskSettings)
The task settings.

Returns:

The newly created task.

public ProgressTask AddTaskAfter(string description, ProgressTask referenceProgressTask, bool autoStart = true, double maxValue = 100)

Adds a task after the reference task.

Parameters:

description (string)
The task description.
referenceProgressTask (ProgressTask)
The reference task to add after.
autoStart (bool)
Whether or not the task should start immediately.
maxValue (double)
The task's max value.

Returns:

The newly created task.

public ProgressTask AddTaskAfter(string description, ProgressTaskSettings settings, ProgressTask referenceProgressTask)

Adds a task after the reference task.

Parameters:

description (string)
The task description.
settings (ProgressTaskSettings)
The task settings.
referenceProgressTask (ProgressTask)
The reference task to add after.

Returns:

The newly created task.

public ProgressTask AddTaskAt(string description, int index, bool autoStart = true, double maxValue = 100)

Adds a task.

Parameters:

description (string)
The task description.
index (int)
The index at which the task should be inserted.
autoStart (bool)
Whether or not the task should start immediately.
maxValue (double)
The task's max value.

Returns:

The newly created task.

public ProgressTask AddTaskAt(string description, ProgressTaskSettings settings, int index)

Adds a task at the specified index.

Parameters:

description (string)
The task description.
settings (ProgressTaskSettings)
The task settings.
index (int)
The index at which the task should be inserted.

Returns:

The newly created task.

public ProgressTask AddTaskBefore(string description, ProgressTask referenceProgressTask, bool autoStart = true, double maxValue = 100)

Adds a task before the reference task.

Parameters:

description (string)
The task description.
referenceProgressTask (ProgressTask)
The reference task to add before.
autoStart (bool)
Whether or not the task should start immediately.
maxValue (double)
The task's max value.

Returns:

The newly created task.

public ProgressTask AddTaskBefore(string description, ProgressTaskSettings settings, ProgressTask referenceProgressTask)

Adds a task before the reference task.

Parameters:

description (string)
The task description.
settings (ProgressTaskSettings)
The task settings.
referenceProgressTask (ProgressTask)
The reference task to add before.

Returns:

The newly created task.

public void Refresh()

Refreshes the current progress.

public bool RemoveTask(ProgressTask task)

Removes the task from the task collection.

Parameters:

task (ProgressTask)
The task to remove.

Returns:

true if the task was successfully removed; otherwise, false.