ContentIterator.ProcessItemsInFolder method (SPList, SPFolder, Boolean, Boolean, ContentIterator.ItemProcessor, ContentIterator.ItemProcessorErrorCallout)
Iterates over items in a folder.
Namespace: Microsoft.Office.Server.Utilities
Assembly: Microsoft.Office.Server (in Microsoft.Office.Server.dll)
Syntax
'Declaration
Public Sub ProcessItemsInFolder ( _
list As SPList, _
folder As SPFolder, _
fRecursive As Boolean, _
fIncludeFolderItems As Boolean, _
itemProcessor As ContentIterator.ItemProcessor, _
errorCallout As ContentIterator.ItemProcessorErrorCallout _
)
'Usage
Dim instance As ContentIterator
Dim list As SPList
Dim folder As SPFolder
Dim fRecursive As Boolean
Dim fIncludeFolderItems As Boolean
Dim itemProcessor As ContentIterator.ItemProcessor
Dim errorCallout As ContentIterator.ItemProcessorErrorCallout
instance.ProcessItemsInFolder(list, folder, _
fRecursive, fIncludeFolderItems, _
itemProcessor, errorCallout)
public void ProcessItemsInFolder(
SPList list,
SPFolder folder,
bool fRecursive,
bool fIncludeFolderItems,
ContentIterator.ItemProcessor itemProcessor,
ContentIterator.ItemProcessorErrorCallout errorCallout
)
Parameters
list
Type: Microsoft.SharePoint.SPListThe SPList object that contains the folder.
folder
Type: Microsoft.SharePoint.SPFolderThe SPFolder object to iterate over.
fRecursive
Type: System.BooleanIf true, iterate over all items in a subfolder.
fIncludeFolderItems
Type: System.BooleanIf true, list items that are folders that will be returned; if false, items that are folders are filtered out.
itemProcessor
Type: Microsoft.Office.Server.Utilities.ContentIterator.ItemProcessorThe callout to process the list items returned by the query.
errorCallout
Type: Microsoft.Office.Server.Utilities.ContentIterator.ItemProcessorErrorCalloutThe optional callout to handle errors.
Remarks
This method uses paged queries to fetch the requested items, callsitemProcessor for each item, and calls the optional errorCallout if an exception occurs while processing an item.