Represents an event that is raised by a agile component, which is a component that can be accessed from any thread. Inherits from EventSource and overrides the
Add member function with an additional type parameter for specifying options for how to invoke the agile event.
template< typename TDelegateInterface, typename TEventSourceOptions = Microsoft::WRL::InvokeModeOptions<FireAll> > class AgileEventSource : public Microsoft::WRL::EventSource< TDelegateInterface, TEventSourceOptions>;
The interface to a delegate that represents an event handler.
An InvokeModeOptions structure whose invokeMode field is set to
The vast majority of components in the Windows Runtime are agile components. For more information, see Threading and Marshaling (C++/CX).
|AgileEventSource::Add Method||Appends the agile event handler represented by the specified delegate interface to the set of event handlers for the current AgileEventSource object.|
Appends the event handler represented by the specified delegate interface to the set of event handlers for the current EventSource object.
HRESULT Add( _In_ TDelegateInterface* delegateInterface, _Out_ EventRegistrationToken* token );
The interface to a delegate object, which represents an event handler.
When this operation completes, a handle that represents the event. Use this token as the parameter to the
Remove() method to discard the event handler.
S_OK if successful; otherwise, an HRESULT that indicates the error.