Base class for custom workers.
To create a custom worker, inherit from this class and implement either DoWorkCore or DoBatchWorkCore
Inheritance Hierarchy
Spotfire.Dxp.Framework.ThreadingWorker
Spotfire.Dxp.Framework.ThreadingWorkerTModel, TItem
Spotfire.Dxp.Application.ExtensionCustomWorkerTModel, TItem
Namespace: Spotfire.Dxp.Application.Extension
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 25.11.10401.3615 (25.11.10401.3615)
Syntax
C#
public abstract class CustomWorker<TModel, TItem> : Worker<TModel, TItem> where TModel : DocumentNode where TItem : WorkItem
Type Parameters
- TModel
- WorkerModel type.
- TItem
- WorkItem type.
The CustomWorkerTModel, TItem type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CustomWorkerTModel, TItem | Creates a new instance.
|
Methods
Name | Description | |
---|---|---|
Cancel | Cancel the work item.
(Inherited from WorkerTModel, TItem.) | |
CreateBatchPredicateCore | Override to customize how work items are selected for batch work.
The default implementation returns null, which selects all work items.
(Inherited from WorkerTModel, TItem.) | |
Dispose | Override this method to clean up resources.
(Inherited from Worker.) | |
DoBatchWorkCore | Override this method to handle a batch of work items at a time.
You must call ReturnItem for each work item in the batch.
The default implementation calls DoWorkCore(TModel, TItem) followed by ReturnItem for each work item.
(Inherited from WorkerTModel, TItem.) | |
DoWorkCore | Override this method to handle a single work item at a time.
This method is called by DoBatchWorkCore.
The default implementation does nothing.
(Inherited from WorkerTModel, TItem.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetServiceTService |
Gets the service of the given type. This method provides access to
services on the analysis application level and upwards.
(Inherited from WorkerTModel, TItem.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
Properties
Name | Description | |
---|---|---|
MaxBatchSize | Gets or sets the maximum batch size.
The default value is 1.
(Inherited from Worker.) |
Version Information
See Also