public void SendGameOver(GameSnapshot snapshot) { lock (syncObject) { if (game != null) { var viewModel = snapshot.ToViewModel(); Application.Current.Dispatcher.InvokeAsync(() => game.SendGameOver(viewModel)); } } }