コード例 #1
0
 public void UnregisterListener(IIncidentUpdateListener listener)
 {
     if (listener != null)
     {
         Console.WriteLine("Unregistering an incident update listener.");
         _incidentUpdateListeners.TryRemove(listener, out _);
     }
     else
     {
         Console.WriteLine("Cannot unregister 'null' as incident update listener.");
     }
 }
コード例 #2
0
 public void RegisterListener(IIncidentUpdateListener listener)
 {
     if (listener != null)
     {
         Console.WriteLine("Registering a new incident update listener.");
         _incidentUpdateListeners.TryAdd(listener, 1);
     }
     else
     {
         Console.WriteLine("Cannot register 'null' as incident update listener.");
     }
 }