AppInstance.CancelAllJobs 方法

Cancels each currently running lifecycle job for an app instance.

命名空间:  Microsoft.SharePoint.Client
程序集:   Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)

语法

声明
Public Function CancelAllJobs As ClientResult(Of Boolean)
用法
Dim instance As AppInstance
Dim returnValue As ClientResult(Of Boolean)

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

返回值

类型: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.

备注

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.

另请参阅

引用

AppInstance 类

AppInstance 成员

Microsoft.SharePoint.Client 命名空间