共用方式為


BackgroundTaskCanceledEventHandler 代理人

定義

表示處理背景工作取消的方法。

public delegate void BackgroundTaskCanceledEventHandler(IBackgroundTaskInstance ^ sender, BackgroundTaskCancellationReason reason);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(2797910720, 20984, 19543, 172, 63, 21, 109, 209, 104, 12, 79)]
class BackgroundTaskCanceledEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(2797910720, 20984, 19543, 172, 63, 21, 109, 209, 104, 12, 79)]
public delegate void BackgroundTaskCanceledEventHandler(IBackgroundTaskInstance sender, BackgroundTaskCancellationReason reason);
var backgroundTaskCanceledEventHandlerHandler = function(sender, reason){
/* Your code */
}
Public Delegate Sub BackgroundTaskCanceledEventHandler(sender As IBackgroundTaskInstance, reason As BackgroundTaskCancellationReason)

參數

sender
IBackgroundTaskInstance

已取消的背景工作實例。

reason
BackgroundTaskCancellationReason

取消背景工作實例的原因。

屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

適用於