public void RefreshLinks() { var drivers = Laps.GetDrivers(); NonRacePositionCollection bestLaps = new NonRacePositionCollection(); // order laps of all drivers by time foreach (var driver in drivers) { var laps = Laps[driver]; LapProvider.ReLinkByCrossedAt(laps); LapProvider.ReLinkByTime(laps); laps.Sort(new Lap.ByLapTimeComparer()); if (laps.Count > 0) { bestLaps.Add(laps[0]); } } // get positions bestLaps.Sort(new Lap.ByLapTimeComparer()); Positions = bestLaps; }
public NonRaceSession(Weekend parentWeekend) : base(parentWeekend) { this.Positions = new NonRacePositionCollection(); this.Laps = new SessionLapCollection <NonRaceLap>(this); }
public override void Clear() { this.Positions = new NonRacePositionCollection(); this.Laps = new SessionLapCollection <NonRaceLap>(this); }