Пример #1
0
 public void RemoveSignalHandler(SignalEntry entry)
 {
     SignalEntry.HandleSignalMessageDelegate handler;
     if (this.signals.TryGetValue(entry.key, out handler))
     {
         handler -= entry.signalHandler;
         this.signals[entry.key] = handler; // Seriously ? Sigh...
     }
 }
Пример #2
0
 public void AddSignalHandler(SignalEntry entry)
 {
     SignalEntry.HandleSignalMessageDelegate handler;
     if (this.signals.TryGetValue(entry.key, out handler))
     {
         handler += entry.signalHandler;
         this.signals[entry.key] = handler; // Seriously ? Sigh...
     }
     else
     {
         this.signals[entry.key] = entry.signalHandler;
     }
 }