public SynchronizeFilesWhenFileChanged( IObservable<MusicMirrorConfiguration> configurationObservable, IFileObserverFactory fileObserverFactory, IFileSynchronizerVisitorFactory fileSynchronizerVisitorFactory, IScheduler synchronizationScheduler, IScheduler notificationsScheduler) { if (configurationObservable == null) throw new ArgumentNullException(nameof(configurationObservable)); if (fileObserverFactory == null) throw new ArgumentNullException(nameof(fileObserverFactory)); if (fileSynchronizerVisitorFactory == null) throw new ArgumentNullException(nameof(fileSynchronizerVisitorFactory)); if (synchronizationScheduler == null) throw new ArgumentNullException(nameof(synchronizationScheduler)); if (notificationsScheduler == null) throw new ArgumentNullException(nameof(notificationsScheduler)); _subscribtions = new CompositeDisposable(); _configurationObservable = configurationObservable; _fileObserverFactory = fileObserverFactory; _fileSynchronizerVisitorFactory = fileSynchronizerVisitorFactory; _transcodingResultNotifications = new Subject<IFileTranscodingResultNotification>(); _fileNotifications = new Subject<IFileNotification[]>(); _numberOfFilesAddedInTranscodingQueue = new ReplaySubject<int>(1, ImmediateScheduler.Instance).DisposeWith(_subscribtions); _numberOfFilesAddedInTranscodingQueue.OnNext(0); _isTranscodingRunning = ObserveIsTranscodinningRunningCold().ReplayAndConnect(1, _subscribtions, ImmediateScheduler.Instance); _synchronizationScheduler = synchronizationScheduler; _notificationsScheduler = notificationsScheduler; }
public LoggingFileSynchronizerVisitorFactory(IFileSynchronizerVisitorFactory innerFactory, ILogger log) { _innerFactory = Guard.ForNull(innerFactory, nameof(innerFactory)); _log = Guard.ForNull(log, nameof(log)); }