SPWorkItemJobDefinition.ProcessWorkItem method
Launches the processing of a specific work item and specifies the content database, the work item collection that contains the work item, the specific work item itself, and the current state of the pausable timer job.
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Protected Overridable Function ProcessWorkItem ( _
contentDatabase As SPContentDatabase, _
workItems As SPWorkItemCollection, _
workItem As SPWorkItem, _
jobState As SPJobState _
) As Boolean
'Usage
Dim contentDatabase As SPContentDatabase
Dim workItems As SPWorkItemCollection
Dim workItem As SPWorkItem
Dim jobState As SPJobState
Dim returnValue As Boolean
returnValue = Me.ProcessWorkItem(contentDatabase, _
workItems, workItem, jobState)
protected virtual bool ProcessWorkItem(
SPContentDatabase contentDatabase,
SPWorkItemCollection workItems,
SPWorkItem workItem,
SPJobState jobState
)
Parameters
contentDatabase
Type: Microsoft.SharePoint.Administration.SPContentDatabaseThe SPContentDatabase instance that contains the work item.
workItems
Type: Microsoft.SharePoint.SPWorkItemCollectionThe work item collection (SPWorkItemCollection instance) that contains the work item to process.
workItem
Type: Microsoft.SharePoint.SPWorkItemThe specific SPWorkItem instance to process.
jobState
Type: Microsoft.SharePoint.Administration.SPJobStateThe current state of the pausable timer job as represented by the SPJobState instance.
Return value
Type: System.Boolean
Returns Booleantrue if the timer job should continue processing the work item.