![]() |
Dawn of Light - Class documentation 2900
This is the Dawn of Light project
|
This class represents a collection of event handlers. You can add and remove handlers from this list and fire events with parameters which will be routed through all handlers. More...
Public Member Functions | |
WeakMulticastDelegate | GetEventDelegate (DOLEvent e) |
DOLEventHandlerCollection () | |
Constructs a new DOLEventHandler collection. | |
void | AddHandler (DOLEvent e, DOLEventHandler del) |
Adds an event handler to the list. | |
void | AddHandlerUnique (DOLEvent e, DOLEventHandler del) |
Adds an event handler to the list, if it's already added do nothing. | |
void | RemoveHandler (DOLEvent e, DOLEventHandler del) |
Removes an event handler from the list. | |
void | RemoveAllHandlers (DOLEvent e) |
Removes all callback handlers for a given event. | |
void | RemoveAllHandlers () |
Removes all event handlers. | |
void | Notify (DOLEvent e) |
Notifies all registered event handlers of the occurance of an event! | |
void | Notify (DOLEvent e, object sender) |
Notifies all registered event handlers of the occurance of an event! | |
void | Notify (DOLEvent e, EventArgs args) |
Notifies all registered event handlers of the occurance of an event! | |
void | Notify (DOLEvent e, object sender, EventArgs eArgs) |
Notifies all registered event handlers of the occurance of an event! | |
Properties | |
int | Count [get] |
This class represents a collection of event handlers. You can add and remove handlers from this list and fire events with parameters which will be routed through all handlers.
This class is lazy initialized, meaning as long as you don't add any handlers, the memory usage will be very low!
DOL.Events.DOLEventHandlerCollection.DOLEventHandlerCollection | ( | ) |
Constructs a new DOLEventHandler collection.
void DOL.Events.DOLEventHandlerCollection.AddHandler | ( | DOLEvent | e, |
DOLEventHandler | del | ||
) |
Adds an event handler to the list.
e | The event from which we add a handler |
del | The callback method |
void DOL.Events.DOLEventHandlerCollection.AddHandlerUnique | ( | DOLEvent | e, |
DOLEventHandler | del | ||
) |
Adds an event handler to the list, if it's already added do nothing.
e | The event from which we add a handler |
del | The callback method |
void DOL.Events.DOLEventHandlerCollection.Notify | ( | DOLEvent | e, |
EventArgs | args | ||
) |
Notifies all registered event handlers of the occurance of an event!
e | The event that occured |
args | The event arguments |
void DOL.Events.DOLEventHandlerCollection.Notify | ( | DOLEvent | e, |
object | sender | ||
) |
Notifies all registered event handlers of the occurance of an event!
e | The event that occured |
sender | The sender of this event |
void DOL.Events.DOLEventHandlerCollection.Notify | ( | DOLEvent | e, |
object | sender, | ||
EventArgs | eArgs | ||
) |
Notifies all registered event handlers of the occurance of an event!
e | The event that occured |
sender | The sender of this event |
eArgs | The event arguments |
Overwrite the EventArgs class to set own arguments
void DOL.Events.DOLEventHandlerCollection.Notify | ( | DOLEvent | e | ) |
Notifies all registered event handlers of the occurance of an event!
e | The event that occured |
void DOL.Events.DOLEventHandlerCollection.RemoveAllHandlers | ( | ) |
Removes all event handlers.
void DOL.Events.DOLEventHandlerCollection.RemoveAllHandlers | ( | DOLEvent | e | ) |
Removes all callback handlers for a given event.
e | The event from which to remove all handlers |
void DOL.Events.DOLEventHandlerCollection.RemoveHandler | ( | DOLEvent | e, |
DOLEventHandler | del | ||
) |
Removes an event handler from the list.
e | The event from which to remove the handler |
del | The callback method to remove |