DeferrableEventArgs Class

Visual Studio 2015
 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at DeferrableEventArgs Class.

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

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.

Public Methods

NameDescription
DeferrableEventArgs::GetDeferral MethodGets a reference to the Deferral object which represents a deferred event.
DeferrableEventArgs::InvokeAllFinished MethodCalled to indicate that all processing to handle a deferred event is complete.

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.

Header: event.h

Namespace: Microsoft::WRL

Microsoft::WRL Namespace

Show: