public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration configuration) { Assert.ArgumentNotNull(targetDataStore, "serializationProvider"); Assert.ArgumentNotNull(predicate, "predicate"); Assert.ArgumentNotNull(fieldFilter, "fieldPredicate"); Assert.ArgumentNotNull(logger, "logger"); Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore"); Assert.ArgumentNotNull(configuration, "configuration"); _logger = logger; _configuration = configuration; _predicate = predicate; _fieldFilter = fieldFilter; _targetDataStore = targetDataStore; _sourceDataStore = sourceDataStore; try { _targetDataStore.RegisterForChanges(RemoveItemFromCaches); } catch (NotImplementedException) { // if the data store doesn't implement watching, cool story bruv } }
public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration configuration) { Assert.ArgumentNotNull(targetDataStore, "serializationProvider"); Assert.ArgumentNotNull(predicate, "predicate"); Assert.ArgumentNotNull(fieldFilter, "fieldPredicate"); Assert.ArgumentNotNull(logger, "logger"); Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore"); Assert.ArgumentNotNull(configuration, "configuration"); _logger = logger; _disableTransparentSync = !configuration.EnableTransparentSync; _predicate = predicate; _fieldFilter = fieldFilter; _targetDataStore = targetDataStore; _sourceDataStore = sourceDataStore; try { _targetDataStore.RegisterForChanges(RemoveItemFromCaches); } catch (NotImplementedException) { // if the data store doesn't implement watching, cool story bruv } }
public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration dataProviderConfiguration, PredicateRootPathResolver rootPathResolver) { Assert.ArgumentNotNull(targetDataStore, "serializationProvider"); Assert.ArgumentNotNull(predicate, "predicate"); Assert.ArgumentNotNull(fieldFilter, "fieldPredicate"); Assert.ArgumentNotNull(logger, "logger"); Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore"); Assert.ArgumentNotNull(dataProviderConfiguration, "configuration"); Assert.ArgumentNotNull(rootPathResolver, "rootPathResolver"); _logger = logger; _dataProviderConfiguration = dataProviderConfiguration; _rootPathResolver = rootPathResolver; _predicate = predicate; _fieldFilter = fieldFilter; _targetDataStore = targetDataStore; _sourceDataStore = sourceDataStore; // enable capturing recycle bin and archive restores to serialize the target item if included EventManager.Subscribe <RestoreItemCompletedEvent>(HandleItemRestored); try { _targetDataStore.RegisterForChanges(RemoveItemFromCaches); } catch (NotImplementedException) { // if the data store doesn't implement watching, cool story bruv } }
public UnicornDataProvider(ITargetDataStore targetDataStore, ISourceDataStore sourceDataStore, IPredicate predicate, IFieldFilter fieldFilter, IUnicornDataProviderLogger logger, IUnicornDataProviderConfiguration dataProviderConfiguration, PredicateRootPathResolver rootPathResolver) { Assert.ArgumentNotNull(targetDataStore, "serializationProvider"); Assert.ArgumentNotNull(predicate, "predicate"); Assert.ArgumentNotNull(fieldFilter, "fieldPredicate"); Assert.ArgumentNotNull(logger, "logger"); Assert.ArgumentNotNull(sourceDataStore, "sourceDataStore"); Assert.ArgumentNotNull(dataProviderConfiguration, "configuration"); Assert.ArgumentNotNull(rootPathResolver, "rootPathResolver"); _logger = logger; _dataProviderConfiguration = dataProviderConfiguration; _rootPathResolver = rootPathResolver; _predicate = predicate; _fieldFilter = fieldFilter; _targetDataStore = targetDataStore; _sourceDataStore = sourceDataStore; // enable capturing recycle bin and archive restores to serialize the target item if included EventManager.Subscribe<RestoreItemCompletedEvent>(HandleItemRestored); try { _targetDataStore.RegisterForChanges(RemoveItemFromCaches); } catch (NotImplementedException) { // if the data store doesn't implement watching, cool story bruv } }