Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 protected void ProcessTeamInfo(TeamInfoDTO info)
 {
     this.teamInfo = info;
     goalKeeper    = this.teamInfo.players.Where(p => p.playerType == "G").First();
 }