TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class EventGeneric in Tinman.Core.Util

The EventGeneric class implements the observer pattern.

sealed class EventGeneric with <T> as class
  extends Event
  implements IEventGeneric<T>
  IEventListenerGeneric<T>

Public / Attributes

LifecycleState

Returns the lifecycle state of this object.

public virtual property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited Disposable.LifecycleState

Public / Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
public method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited Disposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

AddDelegate

Adds a new listener to this event.

[ThreadSafe]
public method AddDelegate (EventDelegate listener)
params listener [not-null] The listener to add.
inherited Event.AddDelegate

Remarks:

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.

AddDelegateGeneric

Adds a new listener to this event.

[ThreadSafe]
public method AddDelegateGeneric (EventDelegateGeneric<T> listener)
params listener [not-null] The listener to add.
implements IEventGeneric.AddDelegateGeneric

Remarks:

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.

AddListener

Adds a new listener to this event.

[ThreadSafe]
public method AddListener (IEventListener listener)
params listener [not-null] The listener to add.
inherited Event.AddListener

Remarks:

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.

AddListenerGeneric

Adds a new listener to this event.

[ThreadSafe]
public method AddListenerGeneric (IEventListenerGeneric<T> listener)
params listener [not-null] The listener to add.
implements IEventGeneric.AddListenerGeneric

Remarks:

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

Removes all listeners from this event.

[ThreadSafe]
public method Clear ()
inherited Event.Clear

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
public method Dispose ()
inherited Disposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

NotifyEvent

The event has been triggered.

public method NotifyEvent (T argument)
params argument The event argument.
overrides Event.NotifyEvent

RemoveDelegate

Removes the given listener from the event.

[ThreadSafe]
public method RemoveDelegate (EventDelegate listener)
params listener [not-null] The listener to remove.
inherited Event.RemoveDelegate

RemoveDelegateGeneric

Removes the given listener from the event.

[ThreadSafe]
public method RemoveDelegateGeneric (EventDelegateGeneric<T> listener)
params listener [not-null] The listener to remove.
implements IEventGeneric.RemoveDelegateGeneric

RemoveListener

Removes the given listener from the event.

[ThreadSafe]
public method RemoveListener (IEventListener listener)
params listener [not-null] The listener to remove.
inherited Event.RemoveListener

RemoveListenerGeneric

Removes the given listener from the event.

[ThreadSafe]
public method RemoveListenerGeneric (IEventListenerGeneric<T> listener)
params listener [not-null] The listener to remove.
implements IEventGeneric.RemoveListenerGeneric