public static List<BattingRecord> Run(CricketMatch match) { var battingRecords = from i in match.Innings from b in i.Batting select CreateBattingRecord(b, i.TeamInningsNumber == 1); return battingRecords.ToList(); }
public static List<BowlingRecord> Run(CricketMatch match) { var bowlingRecords = from i in match.Innings where i.Bowling != null from b in i.Bowling select CreateBowlingRecord(b); return bowlingRecords.ToList(); }
public ScorecardParser(ScorecardDetails details, DependencyFinder finder) { _finder = finder; _match = new CricketMatch { Id = CricketMatch.GenerateId(details.Season, details.MatchCode), MatchCode = details.MatchCode, HomeTeam = details.HomeTeam, AwayTeam = details.AwayTeam, Season = details.Season, StartDate = details.Date, Players = "11 per side", Innings = new List<Innings>() }; }
public static List<FieldingRecord> Run(CricketMatch match) { var fieldingRecord = from i in match.Innings from b in i.Batting where ((b.HowOut == HowOutType.Caught || b.HowOut == HowOutType.Stumped) && !string.IsNullOrEmpty(b.FielderId)) select new FieldingRecord { PlayerId = b.FielderId, Team = i.Bowling[0].Team, Catches = b.HowOut == HowOutType.Caught ? 1 : 0, Stumpings = b.HowOut == HowOutType.Stumped ? 1 : 0 }; return fieldingRecord.ToList(); }
public MatchInfoParser(CricketMatch match, DependencyFinder finder) { _match = match; _finder = finder; }
public InningsParser(CricketMatch match) { _match = match; }