BackgroundTaskCompletedEventHandler Délégué

Définition

Représente une méthode qui gère les événements d’achèvement pour une tâche en arrière-plan.

public delegate void BackgroundTaskCompletedEventHandler(BackgroundTaskRegistration ^ sender, BackgroundTaskCompletedEventArgs ^ args);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1530456361, 41094, 18087, 166, 120, 67, 145, 53, 130, 43, 207)]
class BackgroundTaskCompletedEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1530456361, 41094, 18087, 166, 120, 67, 145, 53, 130, 43, 207)]
public delegate void BackgroundTaskCompletedEventHandler(BackgroundTaskRegistration sender, BackgroundTaskCompletedEventArgs args);
var backgroundTaskCompletedEventHandlerHandler = function(sender, args){
/* Your code */
}
Public Delegate Sub BackgroundTaskCompletedEventHandler(sender As BackgroundTaskRegistration, args As BackgroundTaskCompletedEventArgs)

Paramètres

sender
BackgroundTaskRegistration

Tâche en arrière-plan.

args
BackgroundTaskCompletedEventArgs

Informations d’achèvement de la tâche au moment de l’envoi de la notification.

Attributs

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Remarques

Les événements d’achèvement sont remis uniquement si la tâche est terminée alors que l’application se trouve au premier plan. Si l’application est suspendue, puis terminée, l’achèvement status n’est pas remis. Si l’application est suspendue puis reprise, il est garanti de recevoir la notification d’achèvement.

S’applique à