Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Latest commit

 

History

History
77 lines (50 loc) · 3.12 KB

deferrableeventargs-class.md

File metadata and controls

77 lines (50 loc) · 3.12 KB
description title ms.date ms.topic f1_keywords helpviewer_keywords ms.assetid
Learn more about: DeferrableEventArgs Class
DeferrableEventArgs Class
10/03/2018
reference
event/Microsoft::WRL::DeferrableEventArgs
event/Microsoft::WRL::DeferrableEventArgs::GetDeferral
event/Microsoft::WRL::DeferrableEventArgs::InvokeAllFinished
Microsoft::WRL::DeferrableEventArgs class
Microsoft::WRL::DeferrableEventArgs::GetDeferral method
Microsoft::WRL::DeferrableEventArgs::InvokeAllFinished method
ece89267-7b72-40e1-8185-550c865b070a

DeferrableEventArgs Class

A template class used for the event argument types for deferrals.

Syntax

template <typename TEventArgsInterface, typename TEventArgsClass>
class DeferrableEventArgs : public TEventArgsInterface;

Parameters

TEventArgsInterface
The interface type that declares the arguments for a deferred event.

TEventArgsClass
The class that implements TEventArgsInterface.

Members

Public Methods

Name Description
DeferrableEventArgs::GetDeferral Gets a reference to the Deferral object which represents a deferred event.
DeferrableEventArgs::InvokeAllFinished Called to indicate that all processing to handle a deferred event is complete.

Remarks

Instances of this class are passed to event handlers for deferred events. The template parameters represent an interface that defines the details of the event arguments for a specific type of deferred event, and a class that implements that interface.

The class appears as the first argument to an event handler for a deferred event. You can call the GetDeferral method to get the Deferral object from which you can get all the information about the deferred event. After completing the event handling, you should call Complete on the Deferral object. You should then call InvokeAllFinished at the end of the event handler method, which ensures that the completion of all deferred events is communicated properly.

Requirements

Header: event.h

Namespace: Microsoft::WRL

DeferrableEventArgs::GetDeferral

Gets a reference to the Deferral object which represents a deferred event.

HRESULT GetDeferral([out, retval] Windows::Foundation::IDeferral** result)

Parameters

result
A pointer that will reference the Deferral object when the call completes.

Return Value

S_OK if successful; otherwise, an HRESULT that indicates the error.

DeferrableEventArgs::InvokeAllFinished

Called to indicate that all processing to handle a deferred event is complete.

void InvokeAllFinished()

Remarks

You should call this method after the event source calls InvokeAll. Calling this method prevents further deferrals from being taken and forces the completion handler to execute if no deferrals were taken.