private void AddMatchReceived(Match match) { State.Matches.Add(match); NotifyPropertyChanged(nameof(State)); MatchCreated?.Invoke(match); }
private void Apply(MatchCreated ev) { var data = ev.Data as MatchData; var match = new TournamentRoundQueryContextModel.Match(); match.Id = data.Id; match.Table = data.Table; match.Sets = data.Sets; match.Drawn = data.Drawn; match.Results = Enumerable.Range(1, match.Sets).Select(set_number => (TournamentRoundQueryContextModel.SetResult)SetResult.None).ToList(); match.Home = new TournamentRoundQueryContextModel.Team(); match.Home.Player_one = Map_player(data.Home.Player_one); match.Home.Player_two = Map_player(data.Home.Player_two); match.Away = new TournamentRoundQueryContextModel.Team(); match.Away.Player_one = Map_player(data.Away.Player_one); match.Away.Player_two = Map_player(data.Away.Player_two); if (_ctx_model.Id.Equals(data.Round_id)) { _ctx_model.Matches.Add(match); } }
public void Apply(MatchCreated e) { Id = e.Id; Date = e.Date; PlayerId1 = e.PlayerId1; PlayerId2 = e.PlayerId2; }
private void Handle(MatchCreated request) { var matchActor = GetMatchActor(request.Match.Id); matchActor.Tell(new MatchCreated() { Match = request.Match }); }
private void AddMatchRecieved(Match match) { var newMatches = State.Matches.ToList(); newMatches.Add(match); State.Matches = newMatches.ToArray(); NotifyPropertyChanged(nameof(State)); MatchCreated?.Invoke(match); }
private void Apply(MatchCreated ev) { var data = ev.Data as MatchData; var match = new TournamentRankingQueryContextModel.Match(); match.Id = data.Id; match.Home = Map_team(data.Home.Player_one.Id, data.Home.Player_two.Id, 0); match.Away = Map_team(data.Away.Player_one.Id, data.Away.Player_two.Id, 0); match.Drawn = data.Drawn; _ctx_model.Matches.Add(match); }
public void Handle(MatchCreated e) { Matches.Add(new Match { Id = e.Id, Division = e.Division, Year = e.Year ?? "2014", IsPOA = e.IsPOA, Number = e.Number, Away = e.Away, Home = e.Home, Lane = e.Lane, Centre = e.Centre.ToString(), Slot = e.Slot }); }
public void CreateMatch(Match match) { lock (State) { var newMatches = State.Matches.ToList(); newMatches.Add(match); State.Matches = newMatches.ToArray(); } NotifyPropertyChanged(nameof(State)); var @event = new Event(); @event.Type = Event.EventType.MatchCreated; @event.ChangedObject = match; BroadcastToAllClients(new Packet(@event)); MatchCreated?.Invoke(match); }
public override void OnMatchCreate(bool success, string info, MatchInfo matchInfo) { base.OnMatchCreate(success, info, matchInfo); //Update status if sucesfull State = success ? ENetworkState.InMatchLobby : ENetworkState.IDLE; //Invoke the caallback if (m_OnMatchCreateCallback != null) { m_OnMatchCreateCallback.Invoke(success, info, matchInfo); m_OnMatchCreateCallback = null; } //Fire the event if (MatchCreated != null) { MatchCreated.Invoke(success, info, matchInfo); } }
private void Apply(MatchCreated ev) { var data = ev.Data as MatchData; var match = new TournamentQueryContextModel.Match(); match.Id = data.Id; match.Table = data.Table; match.Sets = data.Sets; match.Drawn = data.Drawn; match.Results = _ctx_model.Create_default_sets(match.Sets).ToList(); match.Home = new TournamentQueryContextModel.Team(); match.Home.Player_one = Map_player(data.Home.Player_one); match.Home.Player_two = Map_player(data.Home.Player_two); match.Away = new TournamentQueryContextModel.Team(); match.Away.Player_one = Map_player(data.Away.Player_one); match.Away.Player_two = Map_player(data.Away.Player_two); var round = _ctx_model.Rounds.First(r => r.Id.Equals(data.Round_id)); round.Matches.Add(match); }
public void Handle(MatchCreated e) { var tournament = Tournaments.SingleOrDefault(x => x.Year == e.Year || x.Id == e.TournamentId); if (tournament == null) { tournament = new Tournament { Year = "2014" }; Tournaments.Add(tournament); } var division = tournament.DivisionSchedules.SingleOrDefault(x => x.Division == e.Division); if (division == null) { division = new Schedule { Division = e.Division }; tournament.DivisionSchedules.Add(division); } division.Games.Add(new Match(e.Id, e.Division, e.Number, e.Away, e.Home, e.Lane, e.Centre, e.IsPOA)); }
public void Handle(MatchCreated e) { MatchYearLookup.Add(e.Id, e.Year ?? "2014"); }
private void Handle(MatchCreated request) { CurrentMatch = request.Match; }
public void Apply(MatchCreated domainEvent) { MatchId = domainEvent.MatchId; TeamAtHome = domainEvent.TeamAtHome; TeamAsGuest = domainEvent.TeamAsGuest; }