BackgroundTaskCompletedEventHandler 代理人

定義

表示處理背景工作完成事件的方法。

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)

參數

sender
BackgroundTaskRegistration

背景工作。

args
BackgroundTaskCompletedEventArgs

傳送通知時工作的完成資訊。

屬性

Windows 需求

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

備註

只有在應用程式位於前景時完成工作時,才會傳遞完成事件。 如果應用程式已暫停,然後終止,則不會傳遞完成狀態。 如果應用程式已暫停,然後繼續,則保證會收到完成通知。

適用於