IEvent

Description

interface Tinman.Core.Util.IEvent

Derived from

IDisposable

Extended by

Event
IEventGeneric

The IEvent class implements the observer pattern.

Public / Methods

Add​Delegate


[ThreadSafe]
public method AddDelegate → (1)

listener in : EventDelegate

[not-null]
The listener to add.

Adds a new listener to this event.

If a listener object is added more than once to an event, it will be notified only once. However, the remove method must be called once for each call to the add method in order to actually remove the listener.

Add​Listener


[ThreadSafe]
public method AddListener → (1)

listener in : IEventListener

[not-null]
The listener to add.

Adds a new listener to this event.

If a listener object is added more than once to an event, it will be notified only once. However, the remove method must be called once for each call to the add method in order to actually remove the listener.

Clear


[ThreadSafe]
public method Clear → ()

Removes all listeners from this event.

Remove​Delegate


[ThreadSafe]
public method RemoveDelegate → (1)

listener in : EventDelegate

[not-null]
The listener to remove.

Removes the given listener from the event.

Remove​Listener


[ThreadSafe]
public method RemoveListener → (1)

listener in : IEventListener

[not-null]
The listener to remove.

Removes the given listener from the event.

Public / Attributes

Has​Listeners


[ThreadSafe]
public attribute HasListeners → (get)

value : bool

true if there is at least one registered listener,
false if there are no listeners.

Does this event have one or more listeners?