public void UpdateOptions(Options options, bool checkIfOnline) { _pendingOutlookItems.Clear(); _fullSyncPending = false; _profileName = options.Name; _profileId = options.Id; _proxyOptions = options.ProxyOptions; _synchronizer = options.Inactive ? NullOutlookSynchronizer.Instance : _synchronizerFactory.CreateSynchronizer(options); _interval = TimeSpan.FromMinutes(options.SynchronizationIntervalInMinutes); _inactive = options.Inactive; _checkIfOnline = checkIfOnline; if (_folderChangeWatcher != null) { _folderChangeWatcher.ItemSavedOrDeleted -= FolderChangeWatcher_ItemSavedOrDeleted; _folderChangeWatcher.Dispose(); _folderChangeWatcher = null; } if (!_inactive && options.EnableChangeTriggeredSynchronization) { _folderChangeWatcher = _folderChangeWatcherFactory.Create(options.OutlookFolderEntryId, options.OutlookFolderStoreId); _folderChangeWatcher.ItemSavedOrDeleted += FolderChangeWatcher_ItemSavedOrDeleted; } }
public void UpdateOptions(Options options) { _profileName = options.Name; _synchronizer = _synchronizerFactory.CreateSynchronizer(options); _interval = TimeSpan.FromMinutes(options.SynchronizationIntervalInMinutes); _inactive = options.Inactive; }
public void UpdateOptions(Options options, bool checkIfOnline) { _pendingOutlookItems.Clear(); _fullSyncPending = false; _profileName = options.Name; _profileId = options.Id; _synchronizer = _synchronizerFactory.CreateSynchronizer(options); _interval = TimeSpan.FromMinutes(options.SynchronizationIntervalInMinutes); _inactive = options.Inactive; _changeTriggeredSynchronizationEnabled = options.EnableChangeTriggeredSynchronization; _checkIfOnline = checkIfOnline; }
public async Task UpdateOptions(Options options, GeneralOptions generalOptions) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (generalOptions == null) { throw new ArgumentNullException(nameof(generalOptions)); } _pendingOutlookItems.Clear(); _fullSyncPending = false; _profileName = options.Name; _profileId = options.Id; _proxyOptions = options.ProxyOptions; _synchronizer = options.Inactive ? NullOutlookSynchronizer.Instance : await _synchronizerFactory.CreateSynchronizer(options, generalOptions); _interval = TimeSpan.FromMinutes(options.SynchronizationIntervalInMinutes); _inactive = options.Inactive; _checkIfOnline = generalOptions.CheckIfOnline; if (_folderChangeWatcher != null) { _folderChangeWatcher.ItemSavedOrDeleted -= FolderChangeWatcher_ItemSavedOrDeleted; _folderChangeWatcher.Dispose(); _folderChangeWatcher = null; } if (!_inactive && options.EnableChangeTriggeredSynchronization) { _folderChangeWatcher = _folderChangeWatcherFactory.Create(options.OutlookFolderEntryId, options.OutlookFolderStoreId); _folderChangeWatcher.ItemSavedOrDeleted += FolderChangeWatcher_ItemSavedOrDeleted; } }