Delegate for handling processed work items.
The handler must call ReturnItem when it is finished with the work item.
Namespace: Spotfire.Dxp.Framework.ThreadingAssembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 18.10.8513.5432 (18.10.8513.5432)
Syntax
Parameters
- workItem
- Type: TItem
Processed work item.
Type Parameters
- TItem
- Work item type.
Examples
WorkItemHandler<WorkItem> workItemHandler = delegate(WorkItem workItem) { AnalysisServices.GetService<ApplicationThread>().InvokeAsynchronously(delegate() { try { if (workItem.IsResultValid && !workItem.IsCanceled) { // do something to the document. } } finally { // Tell threading framework that your work item handler is done. workItem.ReturnItem(); } }); };
Version Information
See Also