![]() |
Fiber
Fibers Lighweight Cooperative Multitasking
|
Cached C# Action instances using the observer pattern More...
Public Member Functions | |
delegate void | Action (Emitter emitter) |
Returns false to remove listener from future firings More... | |
T | Context< T > () |
Retrieve the context as a class type - null for none or wrong type More... | |
Emitter | Context< T > (T value) |
Set the context to an instance of a type More... | |
T | Context< T > (string name) |
Retrieve the context as a class type - null for none or wrong type More... | |
Emitter | Context< T > (string name, T value) |
Set the context to an instance of a type More... | |
void | Fire () |
The owner shoots and all the listeners hear More... | |
Emitter | Listen (Action action) |
Ask an emitter to tell me too More... | |
Emitter | Remove (Action action) |
Remove a listener if it is in the list More... | |
Emitter | StopListening () |
Remove the listener currently being acted on More... | |
void | RemoveAllListeners () |
Removes all listeners More... | |
void | Dispose () |
Call when we are done with this emitter. More... | |
override string | ToString () |
Public Attributes | |
int | Firings |
Count of the number of times an emitter has fired More... | |
bool | Waiting => listeners.Count > 0 |
Return true if we have one or more listeners registered More... | |
Static Public Attributes | |
static Emitter | Instance => Cache<Emitter>.Instance |
Retrieve an emitter from recycling or new More... | |
Properties | |
static Emitter | SingleFireInstance [get] |
Fire once then dispose of the emitter More... | |
Cached C# Action instances using the observer pattern
Definition at line 8 of file Emitter.cs.
delegate void Askowl.Emitter.Action | ( | Emitter | emitter | ) |
T Askowl.Emitter.Context< T > | ( | ) |
Retrieve the context as a class type - null for none or wrong type
T | : | class | |
T | : | context | |
T | : | typeof | |
T | : | T | |
T | : | Value | |
T | : | as | |
T | : | T |
Emitter Askowl.Emitter.Context< T > | ( | T | value | ) |
Set the context to an instance of a type
T | : | class |
Definition at line 32 of file Emitter.cs.
T Askowl.Emitter.Context< T > | ( | string | name | ) |
Retrieve the context as a class type - null for none or wrong type
T | : | class | |
T | : | context | |
T | : | name | |
T | : | Value | |
T | : | as | |
T | : | T |
Emitter Askowl.Emitter.Context< T > | ( | string | name, |
T | value | ||
) |
Set the context to an instance of a type
T | : | class |
Definition at line 41 of file Emitter.cs.
void Askowl.Emitter.Dispose | ( | ) |
Call when we are done with this emitter.
Definition at line 102 of file Emitter.cs.
void Askowl.Emitter.Fire | ( | ) |
The owner shoots and all the listeners hear
Definition at line 52 of file Emitter.cs.
Definition at line 70 of file Emitter.cs.
Remove a listener if it is in the list
Definition at line 76 of file Emitter.cs.
void Askowl.Emitter.RemoveAllListeners | ( | ) |
Definition at line 93 of file Emitter.cs.
Emitter Askowl.Emitter.StopListening | ( | ) |
Remove the listener currently being acted on
Definition at line 86 of file Emitter.cs.
int Askowl.Emitter.Firings |
Count of the number of times an emitter has fired
Definition at line 67 of file Emitter.cs.
Retrieve an emitter from recycling or new
Definition at line 11 of file Emitter.cs.
bool Askowl.Emitter.Waiting => listeners.Count > 0 |
Return true if we have one or more listeners registered
Definition at line 99 of file Emitter.cs.
|
staticget |
Fire once then dispose of the emitter
Definition at line 17 of file Emitter.cs.