Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EventSource Class

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Represents an event. EventSource member functions add, remove, and invoke event handlers.

template<  
   typename TDelegateInterface  
>  
class EventSource;  

Parameters

TDelegateInterface
The interface to a delegate that represents an event handler.

Public Constructors

NameDescription
EventSource::EventSource ConstructorInitializes a new instance of the EventSource class.

Public Methods

NameDescription
EventSource::Add MethodAppends the event handler represented by the specified delegate interface to the set of event handlers for the current EventSource object.
EventSource::GetSize MethodRetrieves the number of event handlers associated with the current EventSource object
EventSource::InvokeAll MethodCalls each event handler associated with the current EventSource object using the specified argument types and arguments.
EventSource::Remove MethodDeletes the event handler represented by the specified event registration token from the set of event handlers associated with the current EventSource object.

Protected Data Members

NameDescription
EventSource::addRemoveLock_ Data MemberSynchronizes access to the targets_ array when adding, removing, or invoking event handlers.
EventSource::targets_ Data MemberAn array of one or more event handlers.
EventSource::targetsPointerLock_ Data MemberSynchronizes access to internal data members even while event handlers for this EventSource are being added, removed, or invoked.

EventSource

Header: event.h

Namespace: Microsoft::WRL

Microsoft::WRL Namespace

Show:
© 2017 Microsoft