示例#1
0
        public void Capture(List <Customer> customers, string fileName, int batchSize)
        {
            var uniqueEntries = _dataCleaner.RemoveDuplicates(customers);

            for (var i = 0; i < uniqueEntries.Count; i++)
            {
                var fileNumber = (i / batchSize) + 1;
                _csvWriter.Save($"{fileName}.{fileNumber}", _serialiser.SerialiseCustomer(customers[i]));
            }
        }