public void SendGamePlayersSnapshot(GamePlayersSnapshot snapshot) { try { log("is sent a snapshot of the players"); callback.SendGamePlayerSnapshot(snapshot); } catch (Exception ex) { logError("sending snapshot of the players", ex); } }
public void SendGamePlayerSnapshot(GamePlayersSnapshot snapshot) { lock (syncObject) { if (game != null) { var players = snapshot.Players.Select(player => player.ToViewModel()).ToList(); Application.Current.Dispatcher.InvokeAsync(() => game.SendGamePlayerSnapshot(players)); } } }
public void SendGamePlayerSnapshot(GamePlayersSnapshot snapshot) { Console.WriteLine("Players changed."); }