public Scheduler (
ISynchronizerFactory synchronizerFactory,
ISynchronizationReportSink reportSink,
Action ensureSynchronizationContext,
IFolderChangeWatcherFactory folderChangeWatcherFactory,
ISynchronizationRunLogger runLogger)
{
if (synchronizerFactory == null)
throw new ArgumentNullException (nameof (synchronizerFactory));
if (ensureSynchronizationContext == null)
throw new ArgumentNullException (nameof (ensureSynchronizationContext));
if (folderChangeWatcherFactory == null)
throw new ArgumentNullException (nameof (folderChangeWatcherFactory));
if (runLogger == null)
throw new ArgumentNullException (nameof (runLogger));
if (reportSink == null)
throw new ArgumentNullException (nameof (reportSink));
_reportSink = reportSink;
_synchronizerFactory = synchronizerFactory;
_ensureSynchronizationContext = ensureSynchronizationContext;
_folderChangeWatcherFactory = folderChangeWatcherFactory;
_runLogger = runLogger;
_synchronizationTimer.Tick += SynchronizationTimer_Tick;
_synchronizationTimer.Interval = (int) _timerInterval.TotalMilliseconds;
}