BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler BackgroundTaskCompletedEventHandler Delegate

Definition

Represents a method that handles completion events for a background task.

public : delegate void BackgroundTaskCompletedEventHandler(BackgroundTaskRegistration sender, BackgroundTaskCompletedEventArgs args)
struct BackgroundTaskCompletedEventHandler : winrt::Windows::Foundation::IUnknown
{
   BackgroundTaskCompletedEventHandler(std::nullptr_t = nullptr) noexcept;
   template <typename L> BackgroundTaskCompletedEventHandler(L lambda);
   template <typename F> BackgroundTaskCompletedEventHandler(F* function);
   template <typename O, typename M> BackgroundTaskCompletedEventHandler(O* object, M method);
   void operator()(winrt::Windows::ApplicationModel::Background::BackgroundTaskRegistration const& sender, winrt::Windows::ApplicationModel::Background::BackgroundTaskCompletedEventArgs const& args) const;
};
public delegate void BackgroundTaskCompletedEventHandler(BackgroundTaskRegistration sender, BackgroundTaskCompletedEventArgs args)
Public Delegate Sub BackgroundTaskCompletedEventHandler(sender As BackgroundTaskRegistration, args As BackgroundTaskCompletedEventArgs)
var backgroundTaskCompletedEventHandler = function(sender, args) {

 /* Your code */

}

Parameters

args
BackgroundTaskCompletedEventArgs BackgroundTaskCompletedEventArgs BackgroundTaskCompletedEventArgs

Completion information for the task at the time the notification is sent.

Attributes

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Completion events are delivered only if the task completed while the application is in the foreground. If the application is suspended and then terminated, completion status is not delivered. If the application is suspended and then resumed, it is guaranteed to receive the completion notification.