예제 #1
0
        /// <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);
        }
예제 #2
0
 /// <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);
 }