Delegate for handling processed work items.
The handler must call ReturnItem when it is finished with the work item.
Namespace: Spotfire.Dxp.Framework.Threading
Assembly: Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 69.0.21424.2902 (69.0.21424.2902)
Syntax
C#
public delegate void WorkItemHandler<TItem>( TItem workItem ) where TItem : WorkItem
Parameters
- workItem
- Type: TItem
Processed work item.
Type Parameters
- TItem
- Work item type.
Examples
C#
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
Supported in: 14.7, 14.6, 14.5, 14.4, 14.3, 14.2, 14.1, 14.0, 12.5, 12.4, 12.3, 12.2, 12.1, 12.0, 11.8
See Also