static EventExtension() { EventHub = new EventHub(); }
public static void BreakEventLoop(this object eventSource, EventHub eventHub) { eventHub.BreakEventLoop(); }
public static EventMessageHandler Subscribe(this object eventSource, EventHub eventHub, string subscribeId, Action <EventMessage> handler) { return(eventHub.Subscribe(eventSource, subscribeId, handler)); }
public static void Unsubscribe(this object eventSource, EventHub eventHub, EventMessageHandler eventMessageHandler) { eventHub.Unsubscribe(eventMessageHandler); }
public static void Send(this object eventSource, EventHub eventHub, string subscribeId, params KeyValuePair <string, object>[] parameters) { eventHub.BroadcastEvent(eventSource, new EventMessage(subscribeId, parameters)); }