Exemplo n.º 1
0
 public BeamSyncDbProvider(ISyncModeSelector syncModeSelector, IDbProvider otherProvider, ISyncConfig syncConfig, ILogManager logManager)
 {
     _otherProvider = otherProvider ?? throw new ArgumentNullException(nameof(otherProvider));
     _codeDb        = new BeamSyncDb(otherProvider.CodeDb.Innermost, otherProvider.BeamStateDb, syncModeSelector, logManager, syncConfig.BeamSyncContextTimeout, syncConfig.BeamSyncPreProcessorTimeout);
     _stateDb       = new BeamSyncDb(otherProvider.StateDb.Innermost, otherProvider.BeamStateDb, syncModeSelector, logManager, syncConfig.BeamSyncContextTimeout, syncConfig.BeamSyncPreProcessorTimeout);
     BeamSyncFeed   = new CompositeStateSyncFeed <StateSyncBatch?>(logManager, _codeDb, _stateDb);
     StateDb        = new StateDb(_stateDb);
     CodeDb         = new StateDb(_codeDb);
 }
Exemplo n.º 2
0
        public BeamSyncDbProvider(ISyncModeSelector syncModeSelector, IDbProvider otherProvider, ILogManager logManager)
        {
            _otherProvider = otherProvider ?? throw new ArgumentNullException(nameof(otherProvider));
            BeamSyncDb codeDb  = new BeamSyncDb(otherProvider.CodeDb.Innermost, otherProvider.BeamStateDb, syncModeSelector, logManager);
            BeamSyncDb stateDb = new BeamSyncDb(otherProvider.StateDb.Innermost, otherProvider.BeamStateDb, syncModeSelector, logManager);

            BeamSyncFeed = new CompositeStateSyncFeed <StateSyncBatch>(logManager, codeDb, stateDb);
            StateDb      = new StateDb(stateDb);
            CodeDb       = new StateDb(codeDb);
        }