Struct TaskSnapshot
Represents a progress snapshot of an ITask.
[Serializable]
public readonly record struct TaskSnapshot
- Extension Methods
Constructors
TaskSnapshot(TaskState, bool, long, long)
Represents a progress snapshot of an ITask.
public TaskSnapshot(TaskState State, bool UnitsByte = false, long UnitsProcessed = 0, long UnitsTotal = -1)
Parameters
StateTaskStateThe current State of the task.
UnitsBytebooltrueif UnitsProcessed and UnitsTotal are measured in bytes;falseif they are measured in generic units.UnitsProcessedlongThe number of units that have been processed so far.
UnitsTotallongThe total number of units that are to be processed; -1 for unknown.
Properties
State
The current State of the task.
public TaskState State { get; init; }
Property Value
UnitsByte
true if UnitsProcessed and UnitsTotal are measured in bytes; false if they are measured in generic units.
public bool UnitsByte { get; init; }
Property Value
- bool
UnitsProcessed
The number of units that have been processed so far.
public long UnitsProcessed { get; init; }
Property Value
- long
UnitsTotal
The total number of units that are to be processed; -1 for unknown.
public long UnitsTotal { get; init; }
Property Value
- long
Value
The progress of the task as a value between 0 and 1; -1 when unknown.
public double Value { get; }
Property Value
- double
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.