TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class ProgressMonitor in Tinman.Core.Threading.Operations

Default implementation of the IProgressMonitor interface.

sealed class ProgressMonitor extends Disposable
  implements IProgressMonitor

Public / Attributes

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

MostRecentError

Returns the last error that has been reported.

[ThreadSafe]
public property MostRecentError { get }
type TinmanError
value The last error.

Remarks:

The last error will be reset to null.

Progress

Returns a snapshot of the current progress.

[ThreadSafe]
public property Progress { get }
type Pair<int64, int64>
value The number of finished ticks (see First) and the number of ticks in total (see Second). The number of finished ticks will always be less than or equal to the number of ticks in total. Both tick counts will always be greater than or equal to zero.

Public / Constructors

ProgressMonitor

Creates a new instance of ProgressMonitor.

public constructor ProgressMonitor ()

Public / Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
public method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited Disposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

Error

Signals that a critical error has occurred and the operation has stopped.

public method Error (TinmanError errorInfo)
params errorInfo [not-null] The error info object.
implements IProgressMonitor.Error

TicksFinished

The running operation has finished ticks tick units.

public method TicksFinished (int64 ticks)
params ticks [>=0] The number of finished tick units.
implements IProgressMonitor.TicksFinished

Remarks:

Finished ticks should be reported only from within Run method.

TicksPending

The running operation will last for another ticks tick units.

public method TicksPending (int64 ticks)
params ticks [>=0] The number of upcoming tick units.
implements IProgressMonitor.TicksPending

Remarks:

Upcoming ticks should be reported as soon as possible in order to provide a believable progress indication.