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));
            }
        }