Share via


AppInstance.CancelAllJobs method

Cancels each currently running lifecycle job for an app instance.

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

Syntax

'Declaration
Public Function CancelAllJobs As ClientResult(Of Boolean)
'Usage
Dim instance As AppInstance
Dim returnValue As ClientResult(Of Boolean)

returnValue = instance.CancelAllJobs()
public ClientResult<bool> CancelAllJobs()

Return value

Type: Microsoft.SharePoint.Client.ClientResult<Boolean>
Returns true if any jobs existed for this app instance (and therefore were cancelled). This is the case even if the cancellations had no effect, as in the case where the only job was a job that cannot be cancelled, for example uninstallation. Returns false if no jobs existed.

Remarks

If multiple jobs exist, job cancellation is nontransactional. This means that if an exception is raised by this method due to concurrent modification of jobs, all, none, or some jobs may have been cancelled. In this case, the user should retry the cancellation.

See also

Reference

AppInstance class

AppInstance members

Microsoft.SharePoint.Client namespace