Click or drag to resize

BackgroundOperation Class

A background operation, that can be used to run a method in a background task. The method can be run at given intervals. Runs only one method at a time. Will delay the next run, if previous run is still ongoing.
Inheritance Hierarchy
SystemObject
  MFiles.VAF.CommonBackgroundOperation

Namespace:  MFiles.VAF.Common
Assembly:  MFiles.VAF (in MFiles.VAF.dll) Version: 2.1.0.1 (2.1.0.1)
Syntax
C#
public class BackgroundOperation

The BackgroundOperation type exposes the following members.

Constructors
  NameDescription
Public methodBackgroundOperation
Creates a new background operation that runs the method in separate task.
Top
Properties
  NameDescription
Public propertyCancelled
Is the operation cancelled. A cancelled operation cannot be used and is waiting to be disposed.
Public propertyInterval
The interval between runs, when the operation is recurring. Only available when the operation is recurring.
Public propertyName
The name of the background operation.
Public propertyNextRunScheduled
The next run scheduled time in milliseconds. Only available in Waiting state.
Public propertyPreviousRunFinished
The previous run finished time in milliseconds. Only available after the first run has finished.
Public propertyPreviousRunStarted
The previous invocation time in milliseconds. Only available after the first run has started.
Public propertyRecurring
Is the operation recurring.
Public propertyRunCount
The number of finished runs since the creation of the background operation.
Public propertyRunOnceRequestCount
The amount of run once requests. The run once requests will be served immediately after the previous run finishes.
Public propertyState
The state of the background operation.
Public propertyStatus
The status of the background operation.
Public propertyVaultName
The name of the vault where this background operation is running.
Top
Methods
  NameDescription
Public methodCancel
Cancels the operation. A cancelled operation cannot be used and is waiting to be disposed.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRunAtIntervals
Begins running the operation at given intervals. If a run takes longer than the interval, the next run starts immediately after the previous run.
Public methodRunOnce
Runs the operation at once or immediately after the current run is finished.
Public methodRunOnce(Int32)
Runs the operation at once or immediately after the current run is finished.
Public methodStopRunningAtIntervals
Stops running the operation at intervals.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWaitUntilIdle
Waits for the the operation to stop running. Can only return, if the operation is not running at intervals.
Top
Events
  NameDescription
Public eventStatusChanged
The event that is triggered, when the status of the background operation has changed.
Top
See Also