Click or drag to resize

IProgressReporter Interface

Allows a thread to report text to a receiver. Additionally, the thread can use the properties CancellationPending, CancellationToken, and CancellationTokenHard to end the task in a safe way.

Namespace: Altaxo
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public interface IProgressReporter : IProgress<double>, 
	IProgress<string>, IProgress<(string , double )>, 
	IDisposable

The IProgressReporter type exposes the following members.

Properties
 NameDescription
Public propertyCancellationPending Returns true if the activity was cancelled by the user. The script has to check this value periodically. If it is set to true, the script should return.
Public propertyCancellationToken Gets the cancellation token (soft). Typical use of the soft cancellation token is to interrupt some work, without compromising the result (the result typically is incomplete, but not corrupted).
Public propertyCancellationTokenHard Gets the cancellation token (hard). Typical use of the hard cancellation token is to abort some work, with corrupting the result. If the result is not corrupted, then use the .
Public propertyShouldReportNow True if we should report the progress now. The progress can be reported at any time, but if the evaluation of the progress is costing, then this flag should be viewed first.
Public propertyTaskName Gets/Sets the name to show while the task is active.
Top
Methods
 NameDescription
Public methodDisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from IDisposable)
Public methodGetSubTask(Double) Creates a nested task.
Public methodGetSubTask(Double, CancellationToken, CancellationToken) Creates a nested task.
Public methodReport(T)Reports a progress update.
(Inherited from IProgressDouble)
Public methodReport(T)
(Inherited from IProgressString)
Public methodReport(T)
(Inherited from IProgressValueTupleString, Double)
Public methodReportProgress(String) Reports the progress as a text string.
Public methodReportProgress(String, Double) Reports the progress as a text string.
Public methodReportStatus Sets the operation status. Note: the status of the whole operation is the most severe status of all nested monitors. The more severe value persists even if the child monitor gets disposed.
Top
See Also