private void Apply(MatchResultUpdated e) { RosterId = e.NewRosterId; TeamScore = e.NewTeamScore; OpponentScore = e.NewOpponentScore; BitsMatchId = e.NewBitsMatchId; rosterPlayers = new HashSet<string>(e.RosterPlayers); }
public void Update(Roster roster, int teamScore, int opponentScore, int bitsMatchId) { if (roster == null) throw new ArgumentNullException("roster"); VerifyScores(teamScore, opponentScore); roster.MatchResultId = Id; if (roster.Id != RosterId) ApplyChange(new RosterChanged(RosterId, roster.Id)); var matchResultUpdated = new MatchResultUpdated(roster.Id, roster.Players, teamScore, opponentScore, bitsMatchId, RosterId, TeamScore, OpponentScore, BitsMatchId); ApplyChange(matchResultUpdated); }