UpdateCachedLapTimesList() приватный Метод

private UpdateCachedLapTimesList ( ILapTimesReader reader ) : IReadOnlyList
reader ILapTimesReader
Результат IReadOnlyList
Пример #1
0
        private async Task <IReadOnlyList <LapTimeEntry> > ReadRaceEssentialsEntriesAsync()
        {
            InitializeRaceEssentials();
            var raceEssentialsDirectory = Path.Combine(FileUtils.GetPythonAppsDirectory(AcRootDirectory.Instance.RequireValue), "RaceEssentials");

            using (var reader = new RaceEssentialsLapTimesReader(raceEssentialsDirectory, this)) {
                var result = _raceEssentialsStorage.GetCachedLapTimesList(reader);
                if (result != null)
                {
                    return(result);
                }

                await TracksManager.Instance.EnsureLoadedAsync();

                return(_raceEssentialsStorage.UpdateCachedLapTimesList(reader));
            }
        }
Пример #2
0
        private async Task <IReadOnlyList <LapTimeEntry> > ReadSidekickEntriesAsync()
        {
            await TracksManager.Instance.EnsureLoadedAsync();

            InitializeSidekick();
            var sidekickDirectory = Path.Combine(FileUtils.GetPythonAppsDirectory(AcRootDirectory.Instance.RequireValue), "Sidekick");

            using (var reader = new SidekickLapTimesReader(sidekickDirectory, this)) {
                var result = _sidekickStorage.GetCachedLapTimesList(reader);
                if (result != null)
                {
                    return(result);
                }

                await TracksManager.Instance.EnsureLoadedAsync();

                return(_sidekickStorage.UpdateCachedLapTimesList(reader));
            }
        }