TimerJobUtility.ProcessWorkItem Method
Processes a single work item.
Namespace: Microsoft.Office.Server.Utilities
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Function ProcessWorkItem ( _
workItems As SPWorkItemCollection, _
wi As SPWorkItem, _
timerJobState As WorkItemTimerJobState, _
processor As TimerJobUtility.ProcessWorkItemWithState _
) As Boolean
'Usage
Dim instance As TimerJobUtility
Dim workItems As SPWorkItemCollection
Dim wi As SPWorkItem
Dim timerJobState As WorkItemTimerJobState
Dim processor As TimerJobUtility.ProcessWorkItemWithState
Dim returnValue As Boolean
returnValue = instance.ProcessWorkItem(workItems, _
wi, timerJobState, processor)
public bool ProcessWorkItem(
SPWorkItemCollection workItems,
SPWorkItem wi,
WorkItemTimerJobState timerJobState,
TimerJobUtility.ProcessWorkItemWithState processor
)
Parameters
- workItems
Type: Microsoft.SharePoint.SPWorkItemCollection
The work items collection.
- wi
Type: Microsoft.SharePoint.SPWorkItem
The work item.
- timerJobState
Type: Microsoft.Office.Server.Utilities.WorkItemTimerJobState
The timer job state.
- processor
Type: Microsoft.Office.Server.Utilities.TimerJobUtility.ProcessWorkItemWithState
The work item processor.
Return Value
Type: System.Boolean
true if processing should continue; false if processing should stop
Returns Boolean.
Remarks
This method takes care of ensuring the timerJobState instance has its SPSite, SPWeb, and SPUser properties updated as appropriate based on how the instance was constructed.