private void AddIncomingEvent(SportEvent sportEvent) { if (this.incomingEvents == null) { this.incomingEvents = new List <IncomingEventDTO>(); } IncomingEventDTO incomingEvent = new IncomingEventDTO(); incomingEvent.Id = sportEvent.Id; incomingEvent.SportType = sportEvent.SportType.Name; foreach (Result result in sportEvent.Results) { TeamInfoDTO teamInfo = new TeamInfoDTO(); teamInfo.IsHomeGame = result.IsHome; teamInfo.TeamId = result.Team.Id; teamInfo.TeamEvents = this.GetTeamEvents(result.Team.Results, result.Team.Id); } this.incomingEvents.Add(incomingEvent); }
protected void ProcessTeamInfo(TeamInfoDTO info) { this.teamInfo = info; goalKeeper = this.teamInfo.players.Where(p => p.playerType == "G").First(); }