Пример #1
0
 public void Post(string name, object source, object userInfo = null)
 {
     if (name == null)
     {
         throw new ArgumentNullException("name");
     }
     lock (_locker)
     {
         Debug.WriteLine("NewMessage:" + name);
         var msg = new GlobalNotificationMessage(name, source, userInfo);
         foreach (var del in _GetDelegates(name))
         {
             del(msg);
         }
     }
 }
Пример #2
0
        public static void DispatcherRun(Dispatcher dispatcher, GlobalNotificationDelegate action, GlobalNotificationMessage msg)
        {
            GlobalNotificationDelegate func = new GlobalNotificationDelegate(action);

            dispatcher.BeginInvoke(func, msg);
        }