Пример #1
0
 public void SetUpSync(IAppointmentSourceFactory source, IAppointmentDestinationFactory destination, TimeSpan interval)
 {
     lock (_stateLock)
     {
         if (!_paused)
         {
             throw new InvalidOperationException("Cannot set up until paused");
         }
         _synchronizer  = new CalendarSynchronizer(source, destination);
         _timerInterval = interval;
         Logger.Info($"Scheduled synchronization from {_synchronizer.SourceName} to {_synchronizer.DestinationName} every {interval}");
     }
 }
Пример #2
0
 public CalendarSynchronizer(IAppointmentSourceFactory sourceFactory,
                             IAppointmentDestinationFactory destinationFactory)
 {
     _sourceFactory      = sourceFactory;
     _destinationFactory = destinationFactory;
 }