Exemple #1
0
 public void Unregister <T>(IMissiveListener <T> listener) where T : Missive
 {
     try
     {
         listeners[typeof(T)].Remove(listener);
     }
     catch (KeyNotFoundException e)
     {
         Console.WriteLine("{0}: Tried to register a listener handling an Missive type ({1} base {2}) that " +
                           "was not found in the assembly.", e, typeof(T), typeof(T).BaseType);
     }
 }
Exemple #2
0
 public void RegisterGlobalListener(IMissiveListener <Missive> listener)
 {
     globalListeners.Add(listener);
 }