ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Entities.IEventNotifier Interface Reference

An IEventNotifier instance allows for objects to listen to other objects for interesting events based on the given IEvent type. The event dispatcher is a generalization of C#'s support for event, plus additional support for delayed event dispatch. More...

Inherited by Forge.Entities.Implementation.Shared.EventNotifier.

Public Member Functions

void OnEvent< TEvent > (Action< TEvent > onEvent)
 Add a function that will be called a event of type TEvent has been dispatched to this dispatcher. More...
 

Detailed Description

An IEventNotifier instance allows for objects to listen to other objects for interesting events based on the given IEvent type. The event dispatcher is a generalization of C#'s support for event, plus additional support for delayed event dispatch.

Member Function Documentation

void Forge.Entities.IEventNotifier.OnEvent< TEvent > ( Action< TEvent >  onEvent)

Add a function that will be called a event of type TEvent has been dispatched to this dispatcher.

Template Parameters
TEventThe event type to listen for.
Parameters
onEventThe code to invoke.
Type Constraints
TEvent :BaseEvent<TEvent> 

The documentation for this interface was generated from the following file: