public ContactSynchronizerComponents(Options options, OutlookContactRepository <ICardDavRepositoryLogger> atypeRepository, IEntityRepository <WebResourceName, string, vCard, ICardDavRepositoryLogger> btypeRepository, EntitySyncStateFactory <string, DateTime, IContactItemWrapper, WebResourceName, string, vCard, ICardDavRepositoryLogger> syncStateFactory, EntityRelationDataAccess <string, DateTime, OutlookContactRelationData, WebResourceName, string> storageDataAccess, OutlookContactRelationDataFactory entityRelationDataFactory, IEqualityComparer <WebResourceName> btypeIdEqualityComparer, EqualityComparer <string> atypeIdEqulityComparer, IWebDavClient webDavClientOrNullIfFileAccess, LoggingCardDavRepositoryDecorator repository, ContactMappingConfiguration mappingParameters, string storageDataDirectory, Uri serverUrl, ICardDavDataAccess cardDavDataAccess, IStateAwareEntityRepository <WebResourceName, string, ICardDavRepositoryLogger, string> btypeStateAwareEntityRepository, IStateTokenDataAccess <int, string> stateTokenDataAccess, EqualityComparer <string> btypeVersionComparer) { Options = options; AtypeRepository = atypeRepository; BtypeRepository = btypeRepository; SyncStateFactory = syncStateFactory; StorageDataAccess = storageDataAccess; EntityRelationDataFactory = entityRelationDataFactory; BtypeIdEqualityComparer = btypeIdEqualityComparer; AtypeIdEqulityComparer = atypeIdEqulityComparer; WebDavClientOrNullIfFileAccess = webDavClientOrNullIfFileAccess; Repository = repository; MappingParameters = mappingParameters; StorageDataDirectory = storageDataDirectory; ServerUrl = serverUrl; CardDavDataAccess = cardDavDataAccess; BtypeStateAwareEntityRepository = btypeStateAwareEntityRepository; StateTokenDataAccess = stateTokenDataAccess; BtypeVersionComparer = btypeVersionComparer; }
public Synchronizer( IReadOnlyEntityRepository <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TContext> atypeRepository, IReadOnlyEntityRepository <TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext> btypeRepository, IBatchWriteOnlyEntityRepository <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TContext> atypeWriteRepository, IBatchWriteOnlyEntityRepository <TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext> btypeWriteRepository, IInitialSyncStateCreationStrategy <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext> initialSyncStateCreationStrategy, IEntityRelationDataAccess <TAtypeEntityId, TAtypeEntityVersion, TBtypeEntityId, TBtypeEntityVersion> entityRelationDataAccess, IEntityRelationDataFactory <TAtypeEntityId, TAtypeEntityVersion, TBtypeEntityId, TBtypeEntityVersion> entityRelationDataFactory, IInitialEntityMatcher <TAtypeEntityId, TAtypeEntityVersion, TAMatchData, TBtypeEntityId, TBtypeEntityVersion, TBMatchData> initialEntityMatcher, IEqualityComparer <TAtypeEntityId> atypeIdComparer, IEqualityComparer <TBtypeEntityId> btypeIdComparer, ITotalProgressFactory totalProgressFactory, IEqualityComparer <TAtypeEntityVersion> atypeVersionComparer, IEqualityComparer <TBtypeEntityVersion> btypeVersionComparer, IEntitySyncStateFactory <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext> syncStateFactory, IExceptionHandlingStrategy exceptionHandlingStrategy, IMatchDataFactory <TAtypeEntity, TAMatchData> aMatchDataFactory, IMatchDataFactory <TBtypeEntity, TBMatchData> bMatchDataFactory, int?chunkSize, IChunkedExecutor chunkedExecutor, IFullEntitySynchronizationLoggerFactory <TAtypeEntity, TBtypeEntity> fullEntitySynchronizationLoggerFactory, IStateAwareEntityRepository <TAtypeEntityId, TAtypeEntityVersion, TContext, TAtypeStateToken> atypeStateAwareEntityRepository, IStateAwareEntityRepository <TBtypeEntityId, TBtypeEntityVersion, TContext, TBtypeStateToken> btypeStateAwareEntityRepository, IStateTokenDataAccess <TAtypeStateToken, TBtypeStateToken> stateTokenDataAccess, ISynchronizationInterceptorFactory <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext> synchronizationInterceptorFactoryOrNull = null) { if (atypeRepository == null) { throw new ArgumentNullException(nameof(atypeRepository)); } if (btypeRepository == null) { throw new ArgumentNullException(nameof(btypeRepository)); } if (atypeWriteRepository == null) { throw new ArgumentNullException(nameof(atypeWriteRepository)); } if (btypeWriteRepository == null) { throw new ArgumentNullException(nameof(btypeWriteRepository)); } if (initialSyncStateCreationStrategy == null) { throw new ArgumentNullException(nameof(initialSyncStateCreationStrategy)); } if (entityRelationDataAccess == null) { throw new ArgumentNullException(nameof(entityRelationDataAccess)); } if (entityRelationDataFactory == null) { throw new ArgumentNullException(nameof(entityRelationDataFactory)); } if (initialEntityMatcher == null) { throw new ArgumentNullException(nameof(initialEntityMatcher)); } if (atypeIdComparer == null) { throw new ArgumentNullException(nameof(atypeIdComparer)); } if (btypeIdComparer == null) { throw new ArgumentNullException(nameof(btypeIdComparer)); } if (totalProgressFactory == null) { throw new ArgumentNullException(nameof(totalProgressFactory)); } if (atypeVersionComparer == null) { throw new ArgumentNullException(nameof(atypeVersionComparer)); } if (btypeVersionComparer == null) { throw new ArgumentNullException(nameof(btypeVersionComparer)); } if (syncStateFactory == null) { throw new ArgumentNullException(nameof(syncStateFactory)); } if (exceptionHandlingStrategy == null) { throw new ArgumentNullException(nameof(exceptionHandlingStrategy)); } if (aMatchDataFactory == null) { throw new ArgumentNullException(nameof(aMatchDataFactory)); } if (bMatchDataFactory == null) { throw new ArgumentNullException(nameof(bMatchDataFactory)); } if (fullEntitySynchronizationLoggerFactory == null) { throw new ArgumentNullException(nameof(fullEntitySynchronizationLoggerFactory)); } if (atypeStateAwareEntityRepository == null) { throw new ArgumentNullException(nameof(atypeStateAwareEntityRepository)); } if (btypeStateAwareEntityRepository == null) { throw new ArgumentNullException(nameof(btypeStateAwareEntityRepository)); } if (stateTokenDataAccess == null) { throw new ArgumentNullException(nameof(stateTokenDataAccess)); } _chunkSize = chunkSize; _chunkedExecutor = chunkedExecutor; _fullEntitySynchronizationLoggerFactory = fullEntitySynchronizationLoggerFactory; _atypeStateAwareEntityRepository = atypeStateAwareEntityRepository; _btypeStateAwareEntityRepository = btypeStateAwareEntityRepository; _stateTokenDataAccess = stateTokenDataAccess; _initialSyncStateCreationStrategy = initialSyncStateCreationStrategy; _totalProgressFactory = totalProgressFactory; _atypeIdComparer = atypeIdComparer; _btypeIdComparer = btypeIdComparer; _atypeVersionComparer = atypeVersionComparer; _btypeVersionComparer = btypeVersionComparer; _syncStateFactory = syncStateFactory; _exceptionHandlingStrategy = exceptionHandlingStrategy; _aMatchDataFactory = aMatchDataFactory; _bMatchDataFactory = bMatchDataFactory; _synchronizationInterceptorFactory = synchronizationInterceptorFactoryOrNull ?? NullSynchronizationInterceptorFactory <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext> .Instance; _atypeWriteRepository = atypeWriteRepository; _btypeWriteRepository = btypeWriteRepository; _atypeRepository = atypeRepository; _btypeRepository = btypeRepository; _entityRelationDataAccess = entityRelationDataAccess; _entityRelationDataFactory = entityRelationDataFactory; _initialEntityMatcher = initialEntityMatcher; _entitySyncStateChunkCreator = new EntitySyncStateChunkCreator <TAtypeEntityId, TAtypeEntityVersion, TAtypeEntity, TBtypeEntityId, TBtypeEntityVersion, TBtypeEntity, TContext>(chunkSize); }
public LoggingStateAwareCardDavRepositoryDecorator(IStateAwareEntityRepository <WebResourceName, string, int, string> inner) { _inner = inner; }
public StateAwareEntityRepositoryRunInBackgroundDecorator(IStateAwareEntityRepository <TEntityId, TEntityVersion, TContext, TStateToken> stateAwareEntityRepositoryImplementation) { _stateAwareEntityRepositoryImplementation = stateAwareEntityRepositoryImplementation ?? throw new ArgumentNullException(nameof(stateAwareEntityRepositoryImplementation)); }
Create <TEntityId, TEntityVersion, TContext, TStateToken>(IStateAwareEntityRepository <TEntityId, TEntityVersion, TContext, TStateToken> decorated) => new StateAwareEntityRepositoryRunInBackgroundDecorator <TEntityId, TEntityVersion, TContext, TStateToken>(decorated);