public EventService( IGeneralPersistence generalPersistence, IEventPersistence eventPersistence, IMapper mapper ) { this._generalPersistence = generalPersistence; this._eventPersistence = eventPersistence; this._mapper = mapper; }
public SqlEventStoreTests() { EventCollection.AddAssemblyTypes(Assembly.GetExecutingAssembly(), Assembly.GetCallingAssembly()); var streamStoreFactoryMock = new Mock <IStreamStoreFactory>(); streamStoreFactoryMock .Setup(streamStoreFactory => streamStoreFactory.GetStreamStore(3, CancellationToken.None)) .ReturnsAsync(_streamStore); _sut = new SqlEventStore(streamStoreFactoryMock.Object, Activator.CreateInstance); }
public EventStoreBase( ILog log, IAggregateFactory aggregateFactory, IEventJsonSerializer eventJsonSerializer, IEventUpgradeManager eventUpgradeManager, IEnumerable <IMetadataProvider> metadataProviders, IEventPersistence eventPersistence) { _eventPersistence = eventPersistence; _log = log; _aggregateFactory = aggregateFactory; _eventJsonSerializer = eventJsonSerializer; _eventUpgradeManager = eventUpgradeManager; _metadataProviders = metadataProviders.ToList(); }
public void CanResolve() { // Arrange var resolver = EventFlowOptions.New .CreateResolver(); // Act IEventPersistence eventPersistence = null; Assert.DoesNotThrow(() => eventPersistence = resolver.Resolve <IEventPersistence>()); // Assert eventPersistence.Should().NotBeNull(); eventPersistence.Should().BeAssignableTo <InMemoryEventPersistence>(); }
public EventStoreBase( ILogger <EventStoreBase> logger, IAggregateFactory aggregateFactory, IEventJsonSerializer eventJsonSerializer, IEventUpgradeManager eventUpgradeManager, IEnumerable <IMetadataProvider> metadataProviders, IEventPersistence eventPersistence, ISnapshotStore snapshotStore) { _logger = logger; _eventPersistence = eventPersistence; _snapshotStore = snapshotStore; _aggregateFactory = aggregateFactory; _eventJsonSerializer = eventJsonSerializer; _eventUpgradeManager = eventUpgradeManager; _metadataProviders = metadataProviders.ToList(); }
/// <summary> /// /// </summary> /// <param name="log"></param> /// <param name="aggregateFactory"></param> /// <param name="eventJsonSerializer"></param> /// <param name="eventUpgradeManager"></param> /// <param name="metadataProviders"></param> /// <param name="eventPersistence"></param> /// <param name="snapshotStore"></param> /// <param name="dataRetrievalConfiguration"></param> public CustomEventStoreBase( ILog log, IAggregateFactory aggregateFactory, IEventJsonSerializer eventJsonSerializer, IEventUpgradeManager eventUpgradeManager, IEnumerable <IMetadataProvider> metadataProviders, IEventPersistence eventPersistence, ISnapshotStore snapshotStore, IDataRetrievalConfiguration dataRetrievalConfiguration) { _eventPersistence = eventPersistence; _snapshotStore = snapshotStore; _log = log; _aggregateFactory = aggregateFactory; _eventJsonSerializer = eventJsonSerializer; _eventUpgradeManager = eventUpgradeManager; _metadataProviders = metadataProviders.ToList(); _dataRetrievalConfiguration = dataRetrievalConfiguration; }
public EventStore(IEventPersistence eventPersistence, IEventPublisher eventPublisher) { _eventPersistence = eventPersistence; _eventPublisher = eventPublisher; }
public EventStore(IEventPersistence persistenceLayer) { _persistenceLayer = persistenceLayer; }
public ManualEventPersistence(IEventPersistence inner) { _inner = inner; }
public EventPersistenceWithLogging(IEventPersistence persistence) { _persistence = persistence; }
public EventStore(IEventPersistence eventPersistence, IEventPublisher eventPublisher, ILogger <EventStore> logger) { _eventPersistence = eventPersistence; _eventPublisher = eventPublisher; _logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public void Setup() { _eventPersistence = MockRepository.GenerateMock<IEventPersistence>(); _eventPublisher = MockRepository.GenerateMock<IEventPublisher>(); _eventStore = new EventStore(_eventPersistence, _eventPublisher); }
public EventsManagementModel(IEventJsonSerializer eventJsonSerializer, IEventPersistence eventPersistence) { _eventJsonSerializer = eventJsonSerializer ?? throw new ArgumentNullException(nameof(eventJsonSerializer)); _eventPersistence = eventPersistence ?? throw new ArgumentNullException(nameof(eventPersistence)); }
public GetAllDomainEventsQueryHandler(IEventPersistence eventPersistence) { _eventPersistence = eventPersistence; }