Esempio n. 1
0
 public SharpSettingsInMemoryDataWatcher(ILogger logger, SharpSettingsInMemoryDataStore <TSettingsObject> settingsStore, string settingsId,
                                         Action <TSettingsObject> settingsUpdatedCallback,
                                         IEnumerable <BaseTypeComparer> customComparers = null, CancellationTokenSource cts = default)
 {
     _logger = logger;
     _cancellationTokenSource = cts;
     _compareLogic            = new CompareLogic();
     if (customComparers != null)
     {
         _compareLogic.Config.CustomComparers.AddRange(customComparers);
     }
     _store      = settingsStore;
     _settingsId = settingsId;
     _settingsUpdatedCallback = settingsUpdatedCallback;
     CreateWatcherTask();
 }
Esempio n. 2
0
 public SharpSettingsInMemoryDataWatcher(ILogger logger, SharpSettingsInMemoryDataStore <TSettingsObject> settingsStore, WatchableSettings <string> settings,
                                         Action <TSettingsObject> settingsUpdatedCallback,
                                         IEnumerable <BaseTypeComparer> customComparers = null, CancellationTokenSource cts = default)
     : this(logger, settingsStore, settings.Id, settingsUpdatedCallback, customComparers, cts)
 {
 }