BackgroundTaskRegistration Classe

Définition

Représente une tâche en arrière-plan qui a été inscrite auprès du système.

public ref class BackgroundTaskRegistration sealed : IBackgroundTaskRegistration2
public ref class BackgroundTaskRegistration sealed : IBackgroundTaskRegistration2, IBackgroundTaskRegistration3
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BackgroundTaskRegistration final : IBackgroundTaskRegistration2
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BackgroundTaskRegistration final : IBackgroundTaskRegistration2, IBackgroundTaskRegistration3
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BackgroundTaskRegistration : IBackgroundTaskRegistration2
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BackgroundTaskRegistration : IBackgroundTaskRegistration2, IBackgroundTaskRegistration3
Public NotInheritable Class BackgroundTaskRegistration
Implements IBackgroundTaskRegistration2
Public NotInheritable Class BackgroundTaskRegistration
Implements IBackgroundTaskRegistration2, IBackgroundTaskRegistration3
Héritage
Object Platform::Object IInspectable BackgroundTaskRegistration
Attributs
Implémente

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

Le système retourne une instance de cette classe lorsque l’application appelle la méthode BackgroundTaskBuilder.Register.

Historique des versions

Version de Windows Version du SDK Valeur ajoutée
1703 15063 AllTaskGroups
1703 15063 GetTaskGroup
1703 15063 Taskgroup

Propriétés

AllTaskGroups

Obtient les groupes de tâches en arrière-plan.

AllTasks

Énumère les tâches en arrière-plan inscrites d’une application, à l’exception des tâches en arrière-plan inscrites dans un groupe avec Windows.ApplicationModel.Background.Background.BackgroundTaskBuilder.TaskGroup.

AppEnergyUsePredictionContribution

Représente une tâche en arrière-plan qui a été inscrite auprès du système.

Name

Obtient le nom d’une tâche en arrière-plan inscrite.

TaskGroup

Obtient le BackgroundTaskRegistrationGroup dont ce BackgroundTaskRegistration fait partie.

TaskId

Obtient l’identificateur d’une tâche en arrière-plan inscrite.

TaskLastThrottledInStandbyTimestamp

Représente une tâche en arrière-plan qui a été inscrite auprès du système.

Trigger

Il n’est pas destiné à être utilisé dans votre code. Pour tous les types de déclencheurs non pris en charge, la valeur retournée par cette propriété est null.

Méthodes

GetTaskGroup(String)

Obtient l’objet de groupe de tâches associé à l’identificateur de groupe.

Unregister(Boolean)

Annule l’inscription d’une tâche en arrière-plan inscrite.

Événements

Completed

Joint un gestionnaire d’événements terminé à la tâche en arrière-plan inscrite.

Progress

Joint un gestionnaire d’événements de progression à la tâche en arrière-plan inscrite.

S’applique à