public string Merge(IKaVESet <string> relZips)
        {
            Asserts.NotNull(relZips);
            Asserts.That(relZips.Count > 0);
            foreach (var relZip in relZips)
            {
                var zip = _io.GetFullPath_In(relZip);
                Asserts.That(File.Exists(zip));
            }

            var relZipOut = relZips.First();

            _log.NextGroup(relZips.Count, relZipOut);
            var zipOut = _io.GetFullPath_Merged(relZipOut);

            _io.EnsureParentExists(zipOut);

            var numEvents = 0;

            using (var wa = new WritingArchive(zipOut))
            {
                foreach (var e in ReadArchives(relZips))
                {
                    numEvents++;
                    wa.Add(e);
                }
            }

            _log.Result(numEvents);

            return(relZipOut);
        }
Example #2
0
        private void WriteResults(IEnumerable <IDEEvent> events, string relZip)
        {
            _log.WritingEvents();
            var zip = _io.GetFullPath_Out(relZip);

            _io.EnsureParentExists(zip);
            using (var wa = new WritingArchive(zip))
            {
                wa.AddAll(events);
            }
        }