public TelemetryStoryboard Create(LapTelemetryDto lapTelemetryDto)
        {
            TelemetryStoryboard   telemetryStoryboard = new TelemetryStoryboard(lapTelemetryDto.LapSummary);
            List <TelemetryFrame> telemetryFrames     = new List <TelemetryFrame>();
            TelemetryFrame        previousFrame       = null;

            foreach (TimedTelemetrySnapshot timedTelemetrySnapshot in lapTelemetryDto.DataPoints.OrderBy(x => x.LapTimeSeconds))
            {
                TelemetryFrame currentFrame = new TelemetryFrame(timedTelemetrySnapshot, telemetryStoryboard)
                {
                    PreviousFrame = previousFrame
                };
                if (previousFrame == null)
                {
                    telemetryStoryboard.FirstFrame = currentFrame;
                }
                else
                {
                    previousFrame.NextFrame = currentFrame;
                }
                telemetryFrames.Add(currentFrame);
                previousFrame = currentFrame;
            }

            telemetryStoryboard.TelemetryFrames = telemetryFrames.AsReadOnly();
            telemetryStoryboard.LastFrame       = previousFrame;
            return(telemetryStoryboard);
        }
 public TelemetryFrame(TimedTelemetrySnapshot telemetrySnapshot, TelemetryStoryboard storyboard)
 {
     TelemetrySnapshot = telemetrySnapshot;
     Storyboard        = storyboard;
 }