/// <summary> /// Merge source repositories into one target repository. /// </summary> /// <returns>target repository is the result of merging previously /// configured source repositories</returns> public LogEntryRepository Merge() { IEnumerable <LogEntry> logEntries = GetLogEntries(); IEnumerable <LogEntry> sortedLogEntries = logEntries.OrderBy(x => x.TimeStamp); var targetRepository = new LogEntryRepository(); foreach (LogEntry logEntry in sortedLogEntries) { targetRepository.AddLogEntry(new LogEntry(logEntry)); } return(targetRepository); }
/// <summary> /// Adds a sourceRepository to the source repositories of the actual LogAnalysisWorkspace /// </summary> /// <param name="sourceRepository"></param> public void AddSourceRepository(LogEntryRepository sourceRepository) { _sourceRepositories.Add(sourceRepository); }