Export (0) Print
Expand All

SPWorkItemCollection Class

Windows SharePoint Services 3

A collection of SPWorkItem object instances. Derives from Microsoft.SharePoint.SPBaseCollection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
public class SPWorkItemCollection : SPBaseCollection

The SPWorkItemCollection class is used in conjunction with the SPWorkItemJobDefinition class, and clients that implement the Microsoft.SharePoint.ISPWorkItemHost interface (internal). Classes derived from SPWorkItemJobDefinition are designed to be driven by the SPTimerService. The SPWorkItemCollection class uses a SQL query to filter work items before queuing them in batches for processing. Work item collections are homogenous by type. That is, each SPWorkItemCollection object contains work items of only one WorkItemType.

NoteNote

There are two primary hosting classes (that is, classes that implement the Microsoft.SharePoint.ISPWorkItemHost interface [internal]) that you can use to process work items: SPSite and SPContentDatabase. Using SPSite as host gives you greater flexibility; using SPContentDatabase allows you to use the SPWorkItemJobDefinition class to process work items at the broadest scope possible—the scope of the content database.

The SPWorkItemJobDefinition class is useful only for processing work item collections and uses the GetWorkItems method to process at one time all of the site collections (SPSite) that are in the content database.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft