예제 #1
0
 public void UnregisterListener(ILocationUpdateListener listener)
 {
     if (listener != null)
     {
         Console.WriteLine("Unregistering a location listener.");
         _locationListeners.TryRemove(listener, out _);
     }
     else
     {
         Console.WriteLine("Cannot unregister 'null' as location listener.");
     }
 }
예제 #2
0
 public void RegisterListener(ILocationUpdateListener listener)
 {
     if (listener != null)
     {
         Console.WriteLine("Registering a new location listener.");
         _locationListeners.TryAdd(listener, 1);
     }
     else
     {
         Console.WriteLine("Cannot register 'null' as location listener.");
     }
 }