private static void CheckLapNumber(PostedTime time, int expectedLapNumber, string paramName) { if(time != null && time.LapNumber != expectedLapNumber) { throw Guard.LapHistoryEntry_AllTimesMustBeForSameLap(paramName); } }