CancellableOperationT Class

Class that can be cancelled. - The class holds a reference to the system threaded Task that will - process the cancellable logic. - Holds a cancellation token source linked to the token passed via the constructor.

Definition

Namespace: MFiles.VAF.MultiserverMode
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public abstract class CancellableOperation<T>
where T : class, IDeepCloneable
Inheritance
Object    CancellableOperationT
Derived

Type Parameters

T
Backing data object.

Constructors

CancellableOperationT Self initializing constructor.

Properties

Data Data value clone container.
LinkedTokenSource Protected linked cancellation token source. - Used to request cancellation of the process.
Task The system task that processes this operation.
Token Linked cancellation token.

Methods

Cancel Requests cancellation of the operation.
CancelAfter Requests cancellation of the operation.
OnCancellationRequested Cancellation requested event invocation.
ResetCancellationToken Resets the cancellation token source.
ThrowIfCancellationRequested If cancellation has been requested: - The CancellationRequest event is fired. - Then the cancellation exception is thrown.
ThrowIfNull Asserts the passed object is not null.
TriggerCancellationRequested Triggers the cancellation requested event, for any registered listeners.

Events

CancellationRequested Event fired on cancellation requested.

See Also