Wraps a C# event for the delegate T to allow event references. More...
Public Member Functions | |
| delegate void | ForEachCallback (T item) |
| Iterator callback used with ForEach(ForEachCallback) More... | |
| delegate bool | ForEachCancellableCallback (T item) |
| Iterator callback that can cancel iteration by returning false. More... | |
| virtual void | Add (T item) |
| Adds an item to the event list. More... | |
| virtual void | Remove (T item) |
| Remove an item from the event list. More... | |
| virtual void | ForEach (ForEachCallback callback) |
| Iterate and invoke the callback on all items. More... | |
| virtual bool | ForEach (ForEachCancellableCallback callback) |
| Iterate and invoke the callback on all items. More... | |
Public Member Functions inherited from KS.Reactor.ksEvent< ksEvent< T >, T > | |
| delegate void | ForEachCallback (T item) |
| Iterator callback used with ForEach(ForEachCallback) More... | |
| delegate bool | ForEachCancellableCallback (T item) |
| Iterator callback that can cancel iteration by returning false. More... | |
Static Public Member Functions | |
| static E | operator+ (ksEvent< E, T > lhs, T rhs) |
| Adds an event handler to the event. More... | |
| static E | operator- (ksEvent< E, T > lhs, T rhs) |
| Adds an event handler to the event. More... | |
Static Public Member Functions inherited from KS.Reactor.ksEvent< ksEvent< T >, T > | |
| static E | operator+ (ksEvent< E, T > lhs, T rhs) |
| Adds an event handler to the event. More... | |
| static E | operator- (ksEvent< E, T > lhs, T rhs) |
| Adds an event handler to the event. More... | |
Protected Attributes | |
| List< T > | m_handlers = new List<T>() |
Protected Attributes inherited from KS.Reactor.ksEvent< ksEvent< T >, T > | |
| List< T > | m_handlers |
Properties | |
| int | Count [get] |
| The number of registered event handlers. More... | |
| T | Execute [get] |
| Gets a delegate that invokes all event handlers. Returns null if no handlers are register. More... | |
Properties inherited from KS.Reactor.ksIEvent | |
| int | Count [get] |
| The number of registered event handlers. More... | |
Properties inherited from KS.Reactor.ksEvent< ksEvent< T >, T > | |
| int | Count [get] |
| The number of registered event handlers. More... | |
| T | Execute [get] |
| Gets a delegate that invokes all event handlers. Returns null if no handlers are register. More... | |
Wraps a C# event for the delegate T to allow event references.
| T | Delegate type |
| E | The type of this instance. |
| T | Delegate type |
| E | : | ksEvent | |
| E | : | E | |
| E | : | T | |
| T | : | class |
|
virtual |
Adds an item to the event list.
| item | Item to add |
Reimplemented from KS.Reactor.ksEvent< ksEvent< T >, T >.
Reimplemented in KS.Reactor.Server.ksUpdateEvent< T >, and KS.Reactor.ksEvent< E, T >.
|
virtual |
Iterate and invoke the callback on all items.
| callback |
Reimplemented from KS.Reactor.ksEvent< ksEvent< T >, T >.
Reimplemented in KS.Reactor.Server.ksUpdateEvent< T >, and KS.Reactor.ksEvent< E, T >.
|
virtual |
Iterate and invoke the callback on all items.
| callback | Callback to call on the items. Iteration will stop if it returns false. |
Reimplemented from KS.Reactor.ksEvent< ksEvent< T >, T >.
Reimplemented in KS.Reactor.ksEvent< E, T >.
| delegate void KS.Reactor.ksEvent< E, T >.ForEachCallback | ( | T | item | ) |
Iterator callback used with ForEach(ForEachCallback)
| item |
| delegate bool KS.Reactor.ksEvent< E, T >.ForEachCancellableCallback | ( | T | item | ) |
Iterator callback that can cancel iteration by returning false.
| item |
|
static |
Adds an event handler to the event.
| lhs | Event to add handler to. |
| rhs | Handler to add. |
|
static |
Adds an event handler to the event.
| lhs | Event to add handler to. |
| rhs | Handler to add. |
|
virtual |
Remove an item from the event list.
| item | Item to be removed |
Reimplemented from KS.Reactor.ksEvent< ksEvent< T >, T >.
Reimplemented in KS.Reactor.Server.ksUpdateEvent< T >, and KS.Reactor.ksEvent< E, T >.
|
get |
The number of registered event handlers.
|
get |
Gets a delegate that invokes all event handlers. Returns null if no handlers are register.