Udostępnij za pośrednictwem


BackgroundTaskCanceledEventHandler Delegate

Definition

Represents a method that handles the cancellation of a background task.

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)

Parameters

sender
IBackgroundTaskInstance

The background task instance that was cancelled.

reason
BackgroundTaskCancellationReason

The reason the background task instance was cancelled.

Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Applies to