public AggregateSnapshotter_Tests() { _aggregateSnapshotSaver = ObjectContainer.Resolve <IAggregateSnapshotSaver>(); _aggregateSnapshotStore = ObjectContainer.Resolve <IAggregateSnapshotStore>(); _aggregateSnapshotter = ObjectContainer.Resolve <IAggregateSnapshotter>(); _typeNameProvider = ObjectContainer.Resolve <ITypeNameProvider>(); }
public CommitAggregateHelper(IStoreEvents storeEvents, IMessageBroker messageBroker, IAggregateSnapshotStore aggregateSnapshotStore, IOptions <MedikitServerOptions> options) { _storeEvents = storeEvents; _messageBroker = messageBroker; _aggregateSnapshotStore = aggregateSnapshotStore; _serverOptions = options.Value; }
public DefaultAggregateSnapshotter ( IAggregateSnapshotSerializer aggregateSnapshotSerializer, IAggregateSnapshotStore aggregateSnapshotStore ) { _aggregateSnapshotSerializer = aggregateSnapshotSerializer; _aggregateSnapshotStore = aggregateSnapshotStore; }
/// <summary> /// 聚合仓储基类,用于快照获取和生成 /// </summary> /// <param name="eventStore"></param> /// <param name="typeNameProvider"></param> /// <param name="snapshotStore"></param> public DefaultAggregateSnapshotter( IEventStore eventStore, ITypeNameProvider typeNameProvider, IAggregateSnapshotStore snapshotStore) { _eventStore = eventStore; _typeNameProvider = typeNameProvider; _binaryFormatter = new BinaryFormatter(); _snapshotStore = snapshotStore; }
/// <summary> /// Aggregate snapshot saver /// </summary> /// <param name="typeNameProvider"></param> /// <param name="aggregateRootFactory"></param> /// <param name="eventStore"></param> /// <param name="snapshotStore"></param> public DefaultAggregateSnapshotSaver( ITypeNameProvider typeNameProvider, IAggregateRootFactory aggregateRootFactory, IEventStore eventStore, IAggregateSnapshotStore snapshotStore) { _typeNameProvider = typeNameProvider; _aggregateRootFactory = aggregateRootFactory; _eventStore = eventStore; _snapshotStore = snapshotStore; _binaryFormatter = new BinaryFormatter(); _batchSaveSize = 100; _logger = ObjectContainer.Resolve <ILoggerFactory>().Create(GetType().FullName); }
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(); }
public CommitAggregateHelper(IStoreEvents storeEvents, IMessageBroker messageBroker, IAggregateSnapshotStore aggregateSnapshotStore) { _storeEvents = storeEvents; _messageBroker = messageBroker; _aggregateSnapshotStore = aggregateSnapshotStore; }
public InMemoryEventStoreRepository(IAggregateSnapshotStore aggregateSnapshotStore, IStoreEvents storeEvents) { _aggregateSnapshotStore = aggregateSnapshotStore; _storeEvents = storeEvents; }