コード例 #1
0
ファイル: JournalProcessor.cs プロジェクト: EliteAPI/EliteAPI
        /// <inheritdoc />
        public Task ProcessJournalFile(FileInfo journalFile, bool isWhileCatchingUp)
        {
            var journalContent = _fileReader.ReadAllLines(journalFile);
            foreach (var entry in journalContent)
            {
                if (IsInCache(journalFile, entry)) continue;

                AddToCache(journalFile, entry);

                NewJournalEntry?.Invoke(this, new JournalEntry(entry, isWhileCatchingUp));
            }

            return Task.CompletedTask;
        }
コード例 #2
0
        /// <inheritdoc />
        public Task ProcessJournalFile(FileInfo journalFile, bool isWhileCatchingUp)
        {
            IEnumerable <string> journalContent = ReadAllLines(journalFile);

            foreach (string entry in journalContent)
            {
                if (IsInCache(journalFile, entry))
                {
                    continue;
                }

                AddToCache(journalFile, entry);

                NewJournalEntry?.Invoke(this, new JournalEntry(entry, isWhileCatchingUp));
            }

            return(Task.CompletedTask);
        }