A class in Root.Township, the global namespace.
Event that fires once. Handlers added after it fired run straight away with the same arguments.
Constructors
| Member | What it is |
|---|
OneTimeEvent(bool isBlockingDuplicateCall = true) | Creates an OneTimeEvent from isBlockingDuplicateCall. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private object[] args | Arguments from the invoke, replayed to late handlers. |
private static readonly Logger logger | Shared AltaEvent logger. |
Properties
| Member | What it is |
|---|
bool IsBlockingDuplicateCall { get; } | If on (the default), a second Invoke logs an error and does nothing. |
Methods
| Member | What it is |
|---|
override void Invoke(params object[] args) | Fires the event and remembers the arguments; a second call is refused with an error when IsBlockingDuplicateCall is set. |
static OneTimeEvent<T> op_Addition(OneTimeEvent<T> altaEvent, T eventHandler) | Adds a handler, or calls it at once if the event already fired. |
static OneTimeEvent<T> op_Subtraction(OneTimeEvent<T> altaEvent, T eventHandler) | Removes a handler. |
Used in
Members of other types that take, return or hold a OneTimeEvent<T>: