private static bool ResultContainScores(ResultWebResponse result) { if (result == null) { return(false); } if (result.Score != null || result.Points != null || result.EquitableScore != null) { return(true); } return(false); }
private result CreateNewResult(match parentMatch, int teamId, ResultWebResponse clientResult, year year, int priorHandicap) { return(new result { match = parentMatch, score = clientResult.Score, points = clientResult.Points, scoreVariant = clientResult.EquitableScore, priorHandicap = priorHandicap, teamId = teamId, year = year, playerId = clientResult.PlayerId.Value }); }
private static bool VerifyEquitableScore(ResultWebResponse result) { if (result == null) { return(true); } if (result.EquitableScore.HasValue) { return(result.EquitableScore.Value <= result.Score); } // escore is allowed to be null. return(true); }
private bool ShouldCreateResult(ResultWebResponse clientResult) { return(clientResult != null && clientResult.PlayerId.HasValue && clientResult.PlayerId != 0); }