Show / Hide Table of Contents

Class ProgressHelper

A helper class for tracking progress of an operation.

Inheritance
System.Object
ProgressHelper
Namespace: SigStat.Common.Helpers
Assembly: SigStat.Common.dll
Syntax
public class ProgressHelper : IDisposable

Constructors

| Improve this Doc View Source

ProgressHelper()

Initializes an instance of ProgressHelper

Declaration
protected ProgressHelper()

Properties

| Improve this Doc View Source

Elapsed

Gets the total elapsed time measured by the current instance.

Declaration
public TimeSpan Elapsed { get; }
Property Value
Type Description
TimeSpan
| Improve this Doc View Source

Eta

Gets the estimated time of completion assuming linear progress.

Declaration
public DateTime Eta { get; }
Property Value
Type Description
DateTime
| Improve this Doc View Source

Maximum

The total number of individual items to be processed.

Declaration
public int Maximum { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Remaining

Gets the estimated remaining time till completion assuming linear progress.

Declaration
public TimeSpan Remaining { get; }
Property Value
Type Description
TimeSpan
| Improve this Doc View Source

ReportIntervallSeconds

If larger than 0, ReportProgress event will be executed periodically after ReportIntervallSeconds when the Value property changes.

Declaration
public int ReportIntervallSeconds { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Value

The actual number of processed items.

Declaration
public int Value { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

StartNew(Int32, Int32, Action<ProgressHelper>)

Initializes an instance of ProgressHelper with the given parameters. Make sure to manually set the Value property during operation.

Declaration
public static ProgressHelper StartNew(int maximum, int reportIntervallSeconds = 0, Action<ProgressHelper> reportProgress = null)
Parameters
Type Name Description
System.Int32 maximum

The total number of individual items to be processed.

System.Int32 reportIntervallSeconds

If larger than 0, ReportProgress event will be executed periodically after ReportIntervallSeconds when the Value property changes.

Action<ProgressHelper> reportProgress
Returns
Type Description
ProgressHelper

Events

| Improve this Doc View Source

ReportProgress

Event will be executed periodically after ReportIntervallSeconds when the Value property changes.

Declaration
public event Action<ProgressHelper> ReportProgress
Event Type
Type Description
Action<ProgressHelper>
Remarks

If ReportIntervallSeconds is set to 0, this event will be suppressed

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX