Beispiel #1
0
        private void AddNewNames()
        {
            _logger.Info("Adding new names to ISIN list ...");

            var namesInEntities = _marketDataCsvFileRepository
                                  .Entities
                                  .Select(e => e.Name)
                                  .Distinct();

            var newNames = namesInEntities
                           .Where(e => !_isinsCsvFileRepository.ContainsName(e))
                           .ToList();

            if (newNames.Any())
            {
                foreach (var name in newNames)
                {
                    _isinsCsvFileRepository.Add(name);
                }
                _logger.Info($"{newNames.Count} new name(s) are added.");
            }
            else
            {
                _logger.Info($"No names were removed.");
            }
        }
Beispiel #2
0
        private int AddNewNames()
        {
            var namesInEntities = _marketDataCsvFileRepository
                                  .Entities
                                  .Select(e => e.Name)
                                  .Distinct();

            var newNames = namesInEntities
                           .Where(e => !_isinsCsvFileRepository.ContainsName(e))
                           .ToList();

            newNames.ForEach(n => _isinsCsvFileRepository.Add(n));

            return(newNames.Count);
        }