Esempio n. 1
0
 public bool DelWatcher(Watcher watcher)
 {
     if (this.watchers.ContainsKey(watcher.event_identifier))
         return this.watchers[watcher.event_identifier].Remove(watcher);
     else
         return false;
 }
Esempio n. 2
0
 public Watcher AddWatcher(string event_emitter, string event_identifier, Effect effect, Watcher.WatcherCondition condition)
 {
     Watcher watcher = new Watcher(event_emitter, event_identifier, effect, condition);
     if (this.watchers.ContainsKey(watcher.event_identifier))
         this.watchers[watcher.event_identifier].Add(watcher);
     else
     {
         this.watchers[watcher.event_identifier] = new List<Watcher>();
         this.watchers[watcher.event_identifier].Add(watcher);
     }
     return watcher;
 }