private static void SendNotification(INotifierReceiverChange receiver, ChangeNotification notification) { try { receiver.ReceiverChange(notification); } catch (Exception exc) { Console.WriteLine(exc.Message); } }
// public IChangeNotifier NotificationReceiver; public void NotifyChange(ChangeNotification notification, INotifierReceiverChange NotificationReceiver) { lock (lckPendantNotifications) pendantNotifications.Enqueue(new ParChangeNotification_Receiver() { ChangeNotificationReceiver = NotificationReceiver, ChangeNotification = notification }); waitPendantNotifications.Set(); }