Пример #1
0
 public SavableMongoDbAggregateSnapshotter(
     IAggregateSnapshotConfiguration aggregateSnapshotConfiguration,
     ISnapshotCollection snapshotCollection,
     IAggregateSnapshotSerializer aggregateSnapshotSerializer,
     IRepository repository,
     ILoggerFactory loggerFactory,
     ITypeNameProvider typeNameProvider
     )
 {
     _aggregateSnapshotConfiguration = aggregateSnapshotConfiguration;
     _snapshotCollection             = snapshotCollection;
     _aggregateSnapshotSerializer    = aggregateSnapshotSerializer;
     _repository       = repository;
     _logger           = loggerFactory.Create(GetType().FullName);
     _typeNameProvider = typeNameProvider;
 }
        public DefaultAggregateSnapshotSaver
        (
            IAggregateSnapshotConfiguration aggregateSnapshotConfiguration,
            IAggregateSnapshotSerializer aggregateSnapshotSerializer,
            IAggregateSnapshotStore aggregateSnapshotStore,
            ILoggerFactory loggerFactory,
            IRepository repository,
            ITypeNameProvider typeNameProvider
        )
        {
            _aggregateSnapshotConfiguration = aggregateSnapshotConfiguration;
            _aggregateSnapshotSerializer    = aggregateSnapshotSerializer;
            _aggregateSnapshotStore         = aggregateSnapshotStore;
            _logger           = loggerFactory.Create(nameof(DefaultAggregateSnapshotSaver));
            _repository       = repository;
            _typeNameProvider = typeNameProvider;

            SubscribeAggregateSnapshotStoreQueue();
        }