public static MatchFeedModel CreateMatch(MatchFeedType type, TeamFeedModel homeTeam, TeamFeedModel awayTeam, TournamentFeedModel tournament)
 {
     return(new MatchFeedModel()
     {
         Type = type,
         HomeTeam = homeTeam,
         AwayTeam = awayTeam,
         Tournament = tournament
     });
 }
Exemple #2
0
        public MatchFeedModel Get(HtmlNode matchContainer)
        {
            HtmlNode matchInfo = matchContainer.SelectSingleNode(MatchXPaths.HEADER_INFO_BOX);

            MatchFeedType type = GetType(matchInfo);
            IEnumerable <TeamFeedModel> teams      = teamsProvider.Get(matchContainer);
            TournamentFeedModel         tournament = tournamentsProvider.Get(matchInfo);

            MatchFeedModel match = ObjectFactory.CreateMatch(type, teams.First(), teams.Last(), tournament);

            match.Markets = marketsProvider.Get(matchContainer, match);

            return(match);
        }