Class TaskSnapshot
Represents a progress snapshot of an ITask.
Assembly: NanoByte.Common.dll
Syntax
public sealed class TaskSnapshot : ValueType
Constructors
TaskSnapshot(TaskState, Boolean, Int64, Int64)
Represents a progress snapshot of an ITask.
Declaration
public TaskSnapshot(TaskState State, bool UnitsByte = false, long UnitsProcessed = 0L, long UnitsTotal = -1L)
Parameters
Type |
Name |
Description |
TaskState |
State |
The current State of the task.
|
Boolean |
UnitsByte |
true if UnitsProcessed and UnitsTotal are measured in bytes; false if they are measured in generic units.
|
Int64 |
UnitsProcessed |
The number of units that have been processed so far.
|
Int64 |
UnitsTotal |
The total number of units that are to be processed; -1 for unknown.
|
Properties
State
The current State of the task.
Declaration
public TaskState State { get; set; }
Property Value
UnitsByte
Declaration
public bool UnitsByte { get; set; }
Property Value
UnitsProcessed
The number of units that have been processed so far.
Declaration
public long UnitsProcessed { get; set; }
Property Value
UnitsTotal
The total number of units that are to be processed; -1 for unknown.
Declaration
public long UnitsTotal { get; set; }
Property Value
Value
The progress of the task as a value between 0 and 1; -1 when unknown.
Declaration
public double Value { get; }
Property Value
Methods
Deconstruct(out TaskState, out Boolean, out Int64, out Int64)
Declaration
public void Deconstruct(out TaskState State, out bool UnitsByte, out long UnitsProcessed, out long UnitsTotal)
Parameters
Equals(TaskSnapshot)
Declaration
public bool Equals(TaskSnapshot other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
ToString()
Declaration
public override string ToString()
Returns
Operators
Equality(TaskSnapshot, TaskSnapshot)
Declaration
public static bool operator ==(TaskSnapshot left, TaskSnapshot right)
Parameters
Returns
Inequality(TaskSnapshot, TaskSnapshot)
Declaration
public static bool operator !=(TaskSnapshot left, TaskSnapshot right)
Parameters
Returns
Extension Methods