Skip to main content

ConsoleEventProcessor

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
MemberWhat it is
private static Dictionary<string, IConsoleEvent> eventsRegistered events by name.
private static Logger loggerNLog logger for this class.
private static MethodInfo processEventMethodReflection handle to a private ProcessEvent method, looked up in the static constructor.

Properties​

MemberWhat it is
static IEnumerable<IConsoleEvent> Events { get; }All registered console events.

Methods​

MemberWhat 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.