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."); } }
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."); } }