public List<LineUp> MakeLineUp(Int64 matchId, BoxScore_W boxScore) { MatchInfo matchInfo = new MatchInfo(); var homeLineUp = GetLineUp(matchId, boxScore.HomeHitter, AttackType.Home); var awayLineUp = GetLineUp(matchId, boxScore.AwayHitter, AttackType.Away); return homeLineUp.Concat(awayLineUp).ToList(); }
public Match MakeMatch(Situation_W situation, BoxScore_W boxScore) { // MatchInfo 만들기 var matchInfo = MakeMatchInfo(boxScore); // Make Match Match match = new Match(); match.GameId = situation.GameId; // MakeThs match.Ths = MakeThs(match, situation, matchInfo); return match; }
public BoxScore_W Parse(Schedule schedule, String html) { HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(html); var elements = doc.DocumentNode.SelectNodes("//table[@summary='타자기록']"); BoxScore_W boxScore_W = new BoxScore_W(); boxScore_W.GameId = schedule.GameId; boxScore_W.AwayHitter = elements[0].OuterHtml; boxScore_W.HomeHitter = elements[1].OuterHtml; elements = doc.DocumentNode.SelectNodes("//table[@summary='투수기록']"); boxScore_W.AwayPitcher = elements[0].OuterHtml; boxScore_W.HomePitcher = elements[1].OuterHtml; return boxScore_W; }
private MatchInfo MakeMatchInfo(BoxScore_W boxScore) { MatchInfo matchInfo = new MatchInfo(); matchInfo.HomeTeamPitcherInfos = GetPitcherInfos(boxScore.HomePitcher); matchInfo.AwayTeamPitcherInfos = GetPitcherInfos(boxScore.AwayPitcher); matchInfo.HomeTeamHitterInfos = GetBatterInfos(boxScore.HomeHitter); matchInfo.AwayTeamHitterInfos = GetBatterInfos(boxScore.AwayHitter); return matchInfo; }