ForgeDocs
Documentation for the forge framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Forge.Utilities.Notifier< ParamType > Class Template Reference

Wraps the notification pattern, where something happens multiple times but the listeners should only be notified once. More...

Public Member Functions

 Notifier (ParamType param)
 Initializes a new instance of the Notifier{ParamType} class. More...
 
void Reset ()
 Resets this notifier so that it will notify listeners again. More...
 
void Notify ()
 Notify the listeners if they have not already been notified. More...
 

Properties

Action< ParamType > Listener
 Allows objects to listen for notifications. If the notifier has already been triggered, then the added listener is immediately called. More...
 

Detailed Description

Wraps the notification pattern, where something happens multiple times but the listeners should only be notified once.

The Notifier API is thread-safe.

Template Parameters
ParamTypeThe type of the parameter.

Constructor & Destructor Documentation

Forge.Utilities.Notifier< ParamType >.Notifier ( ParamType  param)

Initializes a new instance of the Notifier{ParamType} class.

Parameters
paramThe parameter to notify listeners with.

Member Function Documentation

void Forge.Utilities.Notifier< ParamType >.Notify ( )

Notify the listeners if they have not already been notified.

void Forge.Utilities.Notifier< ParamType >.Reset ( )

Resets this notifier so that it will notify listeners again.

Property Documentation

Action<ParamType> Forge.Utilities.Notifier< ParamType >.Listener
addremove

Allows objects to listen for notifications. If the notifier has already been triggered, then the added listener is immediately called.


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