private void OnGateCampRemoved(GateCampMessageModel gatecamp) { lock (this) { var gateCampToRemove = _gateCamps.FirstOrDefault(x => x.StargateLocations.HasIntersection(gatecamp.StargateLocations)); if (gateCampToRemove != null) { _gateCamps.Remove(gateCampToRemove); Application.Current.Dispatcher.BeginInvoke(new Action(() => { GateCampRemoved?.Invoke(gateCampToRemove); })); } } }
private void OnGateCampRemoved(GateCamp gatecamp) { GateCampRemoved?.Invoke(gatecamp); }