This documentation is for the old version. Go to the latest Graphics Mill docs

SyncHandler.Abort Method

Aborts current operation.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Overridable Sub Abort
C#
public virtual void Abort()

Remarks

The class which was aborted with this operation will throw the AbortedException. In synchronous mode you need to use standard exception handling mechanism (try/catch block or its analogue). In asynchronous mode the exception is retrieved into Stopped event (as its argument). Event Aborted is also fired.

If this method is called from main thread, it retuns a control only when auxilary thread has been stopped terminated. If it is called from the auxilary thread (i.e. from such event handlers like Progress, Paused, Started, etc), this method does not wait for thread terminating (to avoid deadlock).

If it is called after the execution was paused by Pause() method, the operation will be stopped only after call of Continue().

Note

It makes no sense to call Abort() in event Starting because auxilary thread has not been launched yet at that point. It just will not have an effect.

See Also

Reference