A static class in Root.Township, Alta.Console.
Registry of named console events that websocket console clients can subscribe to. Its static constructor registers the log events and ConsoleEvents.
Fields
3 private and internal fields
| Member | What it is |
|---|
private static Dictionary<string, IConsoleEvent> events | Registered events by name. |
private static Logger logger | NLog logger for this class. |
private static MethodInfo processEventMethod | Reflection handle to a private ProcessEvent method, looked up in the static constructor. |
Properties
| Member | What it is |
|---|
static IEnumerable<IConsoleEvent> Events { get; } | All registered console events. |
Methods
| Member | What it is |
|---|
static void Deregister(IConsoleEvent socketEvent) | Removes an event if it is the one registered under its name. |
static void Register(IConsoleEvent socketEvent) | Adds an event under its name, replacing (with a warning) any event already using that name. |
static bool Subscribe(string type, Action<WebSocketCommandHandler.ResponseData> handler) | Adds a handler to the named event; returns false if no such event. |
static bool Unsubscribe(string type, Action<WebSocketCommandHandler.ResponseData> handler) | Removes a handler from the named event; returns false if no such event. |