Beispiel #1
0
 public SalsaRepository(ISalsaClient salsa, IMapperFactory mapperFactory, ISyncErrorHandler syncErrorHandler, ISyncObjectComparator objectComparator)
 {
     _salsa = salsa;
     _mapperFactory = mapperFactory;
     _syncErrorHandler = syncErrorHandler;
     _objectComparator = objectComparator;
 }
Beispiel #2
0
 public Exporter(IQueueRepository source, ISalsaRepository destination, ISyncErrorHandler errorHandler, int batchSize, string name, string objectType, string queueName)
 {
     Name = name;
     _objectType = objectType;
     _queueName = queueName;
     _destination = destination;
     _errorHandler = errorHandler;
     _source = source;
     _batchSize = batchSize;
 }
Beispiel #3
0
        public Sync()
        {
            var mapperFactory = new MapperFactory();

            _errorHandler = new SyncErrorHandler(Config.ErrorToleranceThreshold);
            _salsaClient = new SalsaClient();
            _objectComparator = new SyncObjectComparator(_salsaClient);
            _salsaRepository = new SalsaRepository(_salsaClient, mapperFactory, _errorHandler, _objectComparator);
            _queueRepository = new QueueRepository(mapperFactory);
            _notificationService = new NotificationService(new EmailService());
            _syncSession = new SyncSession(_notificationService);
            _logTrimmer = new LogTrimmer();
        }