Example #1
0
 private void Apply(MatchResult4Updated e)
 {
     RosterId = e.NewRosterId;
     TeamScore = e.NewTeamScore;
     OpponentScore = e.NewOpponentScore;
     BitsMatchId = e.NewBitsMatchId;
     rosterPlayers = new HashSet<string>(e.RosterPlayers);
 }
Example #2
0
        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 Roster4Changed(RosterId, roster.Id));
            var matchResultUpdated = new MatchResult4Updated(roster.Id, roster.Players, teamScore, opponentScore, bitsMatchId, RosterId, TeamScore, OpponentScore, BitsMatchId);
            ApplyChange(matchResultUpdated);
        }