EndGate.EventHandler2 <T, U>

Description: Defines a type constrained event handler object that can maintain bound functions which take in a value T and U and trigger them on demand.

Implements: EndGate.IDisposable

Constructors

EventHandler2 <T, U> ()
Creates a new instance of the EventHandler2 object.

Methods

Bind()
Binds the provided action to the EventHandler2. Trigger will execute all bound functions.

BindFor()
Binds the provided action to the EventHandler2 for the specified number of triggers. Once all triggers have been fired the action will unbind itself. Trigger will execute all bound functions.

Unbind()
Unbinds the provided action from the EventHandler2.

HasBindings()
Determines if the EventHandler2 has active bindings.

Trigger()
Executes all bound functions and passes the provided args to each.

Dispose()
Disposes the event handler and unbinds all bound events.

Examples

There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.