Deferral 类

定义

存储延迟完成后要调用的 DeferralCompletedHandler ,并操作延迟的状态。

public ref class Deferral sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Foundation.IDeferralFactory, 65536, Windows.Foundation.FoundationContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class Deferral final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.FoundationContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Foundation.IDeferralFactory, 65536, "Windows.Foundation.FoundationContract")]
class Deferral final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Foundation.IDeferralFactory), 65536, typeof(Windows.Foundation.FoundationContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class Deferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.FoundationContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Foundation.IDeferralFactory), 65536, "Windows.Foundation.FoundationContract")]
public sealed class Deferral
function Deferral(handler)
Public NotInheritable Class Deferral
继承
Object IInspectable Deferral
属性
实现

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.FoundationContract (在 v1.0 中引入)

注解

有关 Deferral 类的详细信息,请参阅有关 应用生命周期 中的延迟部分和 ExtendedExecution 示例

在完成 DeferralCompletedHandler 之前,Javascript 应用不应允许导航。 这样做可能会导致应用崩溃,应将其视为编程错误。

构造函数

Deferral(DeferralCompletedHandler)

初始化新的 Deferral 对象,并指定要在延迟完成后调用的 DeferralCompletedHandler

方法

Close()

如果尚未调用 DeferralCompletedHandler ,这将调用它并删除对委托的引用。

Complete()

如果尚未调用 DeferralCompletedHandler ,这将调用它并删除对委托的引用。

Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。

适用于

另请参阅