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
State
TaskStateThe current State of the task.
UnitsByte
booltrue
if UnitsProcessed and UnitsTotal are measured in bytes;false
if they are measured in generic units.UnitsProcessed
longThe number of units that have been processed so far.
UnitsTotal
longThe 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
UnitsProcessed
The number of units that have been processed so far.
public long UnitsProcessed { get; init; }
Property Value
UnitsTotal
The total number of units that are to be processed; -1 for unknown.
public long UnitsTotal { get; init; }
Property Value
Value
The progress of the task as a value between 0 and 1; -1 when unknown.
public double Value { get; }
Property Value
Methods
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.