public SynchronizationProfileRunner (
ISynchronizerFactory synchronizerFactory,
ISynchronizationReportSink reportSink,
IFolderChangeWatcherFactory folderChangeWatcherFactory,
Action ensureSynchronizationContext,
ISynchronizationRunLogger runLogger)
{
if (synchronizerFactory == null)
throw new ArgumentNullException (nameof (synchronizerFactory));
if (reportSink == null)
throw new ArgumentNullException (nameof (reportSink));
if (folderChangeWatcherFactory == null)
throw new ArgumentNullException (nameof (folderChangeWatcherFactory));
if (ensureSynchronizationContext == null)
throw new ArgumentNullException (nameof (ensureSynchronizationContext));
if (runLogger == null)
throw new ArgumentNullException (nameof (runLogger));
_synchronizerFactory = synchronizerFactory;
_reportSink = reportSink;
_folderChangeWatcherFactory = folderChangeWatcherFactory;
_ensureSynchronizationContext = ensureSynchronizationContext;
_runLogger = runLogger;
// Set to min, to ensure that it runs on the first run after startup
_lastRun = DateTime.MinValue;
}