ProgressTask Class

Represents a progress task.
public sealed class ProgressTask : IProgress<double>
Namespace
Spectre.Console
Interfaces
  • IProgress<double>

Constructors

ProgressTask(int, string, double, bool)
Initializes a new instance of the ProgressTask class.

Properties

string Description
Gets or sets the task description.
TimeSpan? ElapsedTime
Gets the elapsed time.
int Id
Gets the task ID.
bool IsFinished
Gets a value indicating whether or not the task has finished.
bool IsIndeterminate
Gets or sets a value indicating whether the ProgressBar shows actual values or generic, continuous progress feedback.
bool IsStarted
Gets a value indicating whether or not the task has started.
double MaxValue
Gets or sets the max value of the task.
double Percentage
Gets the percentage done of the task.
TimeSpan? RemainingTime
Gets the remaining time.
double? Speed
Gets the speed measured in steps/second.
DateTime? StartTime
Gets the start time of the task.
ProgressTaskState State
Gets the task state.
DateTime? StopTime
Gets the stop time of the task.
double Value
Gets or sets the value of the task.

Methods

void Increment(double)
Increments the task's value.
void StartTask()
Starts the task.
void StopTask()
Stops and marks the task as finished.

Extension Methods

ProgressTask Description(string)
Sets the task description.
ProgressTask IsIndeterminate(bool)
Sets whether the task is considered indeterminate or not.
ProgressTask MaxValue(double)
Sets the max value of the task.
ProgressTask Value(double)
Sets the value of the task.