Example #1
0
 public static void RaiseEvent(string eventName, object sender, PubSubEventArgs <T> args)
 {
     if (events.ContainsKey(eventName) && events[eventName] != null)
     {
         events[eventName](sender, args);
     }
 }
Example #2
0
 private void PubSubTestHandler(object sender, PubSubEventArgs <object> args)
 {
     // When PubSubtestChanged in MainViewModel.cs value changes to either true or false, this handler executes
     MessageBox.Show("PubSub event item received: " + (string)args.Item);
 }