IOperation
Description
- Derived from
- Extended by
-
IMapProjectionOperation
IModelWriter
Operation abstract
Base interface that can be run via the RunningOperation class.
A class that implements the IOperation interface performs a lengthy task. Typically, this task will be executed in a background thread. Running background operations are represented by instances of the RunningOperation class.
A running background operation provides its current progress via an IProgressMonitor object that has been passed to its Run method.
When a background operation is executed, the following tasks are performed:
-
The
Run
method is called and the operation performs the actual work, providing the its current progress using the given IProgressMonitor object. -
After the background operation has ended (finished, failed or cancelled), it is disposed (see IDisposable.Dispose). Cleanup should be performed there.
- See also
Public / Methods
Cancel
Requests that the running background operation gracefully terminates.
An IOperation is free to honour a cancel request or to ignore it. Cancelling a background operation should be considered as a hint to terminate as soon as possible.
Run
Runs the operation.
If an exception resp. error occurs, it will be reported via IProgressMonitor.Error, and the Run method will return.
Public / Attributes
ShallCancel
Shall the background operation cancel?
Once Cancel has been called, this property will return true
.
Extensions
RunSync
Runs the operation synchronously in the calling thread.
- TinmanException
-
If the operation has failed.