public async Task <LapTelemetryDto> LoadLap(FileInfo file, string customDisplayName) { try { AddToActiveLapJob(); if (!_cachedTelemetries.TryGetValue(file.FullName, out LapTelemetryDto lapTelemetryDto)) { lapTelemetryDto = await Task.Run(() => _telemetryRepository.LoadLapTelemetryDto(file)); lapTelemetryDto.LapSummary.CustomDisplayName = customDisplayName; _cachedTelemetries[lapTelemetryDto.LapSummary.Id] = lapTelemetryDto; } _telemetryViewsSynchronization.NotifyLappAddedToSession(lapTelemetryDto.LapSummary); return(lapTelemetryDto); } catch (Exception ex) { Logger.Error(ex, "Error while loading lap telemetry"); return(null); } finally { RemoveFromActiveLapJob(); } }