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)