ProgressTask

Represents a progress task.

Represents a progress task.

Properties

Description : string

Gets or sets the task description.

ElapsedTime : TimeSpan?

Gets the elapsed time.

HideWhenCompleted : bool?

Gets or sets a value indicating whether to override the default hiding behavior of this task when completed.

Id : int

Gets the task ID.

IsFinished : bool

Gets a value indicating whether or not the task has finished.

IsIndeterminate : bool

Gets or sets a value indicating whether the ProgressBar shows actual values or generic, continuous progress feedback.

IsStarted : bool

Gets a value indicating whether or not the task has started.

MaxSamplesKept : int

Gets or sets the maximum number of samples to keep for calculating speed and estimated time remaining. If set to 0, no samples are kept.

MaxSamplingAge : TimeSpan

Gets or sets the maximum age of samples kept for calculating speed and estimated time remaining. Samples older than this value are discarded to more accurately reflect the current speed.

MaxTimeForSpeedCache : TimeSpan

Gets or sets the maximum time a calculated speed value is cached. When estimating speed, if the oldest sample is older than this value, the current time is used as the end of the timespan instead. This causes the predicted speed to naturally decay if no new samples are received.

MaxValue : double

Gets or sets the max value of the task.

Percentage : double

Gets the percentage done of the task.

RemainingTime : TimeSpan?

Gets the remaining time.

Speed : double?

Gets the speed measured in steps/second.

StartTime : DateTime?

Gets the start time of the task.

State : ProgressTaskState

Gets the task state.

StopTime : DateTime?

Gets the stop time of the task.

Tag : object

Gets or sets optional user tag data.

Value : double

Gets or sets the value of the task.

Methods

public void Increment(double value)

Increments the task's value.

Parameters:

value (double)
The value to increment with.
public void StartTask()

Starts the task.

public void StopTask()

Stops and marks the task as finished.

Extension Methods

ProgressTask Description(this ProgressTask task, string description)

Sets the task description.

Returns:

The same instance so that multiple calls can be chained.

ProgressTask HideWhenCompleted(this ProgressTask task, bool hideWhenCompleted)

Sets whether to override the default hiding behavior of this task when completed.

Returns:

The same instance so that multiple calls can be chained.

ProgressTask IsIndeterminate(this ProgressTask task, bool indeterminate)

Sets whether the task is considered indeterminate or not.

Returns:

The same instance so that multiple calls can be chained.

ProgressTask MaxValue(this ProgressTask task, double value)

Sets the max value of the task.

Returns:

The same instance so that multiple calls can be chained.

ProgressTask Tag(this ProgressTask task, object tag)

Sets the task's tag.

Returns:

The same instance so that multiple calls can be chained.

ProgressTask Value(this ProgressTask task, double value)

Sets the value of the task.

Returns:

The same instance so that multiple calls can be chained.