ContentIterator.ShouldCancel method

Determines whether the iteration should be cancelled at the specified granularity.

Namespace:  Microsoft.Office.Server.Utilities
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Function ShouldCancel ( _
    granularity As IterationGranularity _
) As Boolean
'Usage
Dim instance As ContentIterator
Dim granularity As IterationGranularity
Dim returnValue As Boolean

returnValue = instance.ShouldCancel(granularity)
public bool ShouldCancel(
    IterationGranularity granularity
)

Parameters

Return value

Type: System.Boolean
Returns Boolean.

Remarks

If using ContentIterator directly, the granularity has no effect. It checks if this.Cancel was set to true for the current iteration scope or any scope up the parent hierarchy chain.The TimerJobUtility class does use cancellation scopes.

See also

Reference

ContentIterator class

ContentIterator members

Microsoft.Office.Server.Utilities namespace

ShouldCancel(IterationGranularity)