BackgroundOperationManager Class

A manager to keep track of running background operations and their cancellation.

Definition

Namespace: MFiles.VAF.Common
Assembly: MFiles.VAF (in MFiles.VAF.dll) Version: 24.1.706.1
C#
public class BackgroundOperationManager
Inheritance
Object    BackgroundOperationManager

Constructors

BackgroundOperationManager Initializes new BackgroundOperationManager object.

Properties

VaultName The name of the vault in which the manager is running.

Methods

CancelAll Cancels all background operations.
CancelAllAndWaitForFinish Sends the request for cancelling the background operations and waits for them to finish.
CreateBackgroundOperation(String, Action) Creates a new background operation. The background operations runs the given method at given intervals. Must be separately started.
CreateBackgroundOperation(String, ActionBackgroundOperation) Creates a new background operation. The background operations runs the given method at given intervals. Must be separately started.
Dispose Force disposing.
GetBackgroundOperations Returns all created background operations, that have not been cancelled and finished.
GetCancellationTokenForUninitialization Returns a cancellation token, that gets cancelled, when the vault goes offline.
RunOnce(String, Action) Runs the given action in a background task.
RunOnce(String, ActionBackgroundOperation) Runs the given action in a background task.
StartRecurringBackgroundOperation(String, TimeSpan, Action) Creates a new background operation and starts it. The background operation runs the given method at given intervals.
StartRecurringBackgroundOperation(String, TimeSpan, ActionBackgroundOperation) Creates a new background operation and starts it. The background operation runs the given method at given intervals.

Events

OperationStarting Triggered when a background operation starts.
OperationStopping Triggered when a background operation stops.

See Also