Share via


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

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.

See also

Reference

TimerJobUtility class

TimerJobUtility members

Microsoft.Office.Server.Utilities namespace