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