Esempio n. 1
0
        public void Process()
        {
            var personAddressEntryParser = new PersonCsvEntryParser();
            var accumulator = new Accumulator();

            // collect and parse the entries from the data provider
            var entries = _personAddressProvider
                          .ReadAll()
                          .Select(personAddressEntryParser.Parse);

            // store the entries in the accumulator
            accumulator.Append(entries);

            // get the result, persist them to the writers
            _nameFrequenciesWriter.Save(accumulator.GetNameFrequencies().Select(name => name.ToCsvEntry()));
            _orderedAddressesWriter.Save(accumulator.GetOrderedAddresses().Select(address => address.ToCsvEntry()));
        }
Esempio n. 2
0
 public void Init()
 {
     _parser = new PersonCsvEntryParser();
 }