public AggregateStoreDependencies(IEventDeserializer eventDeserializer,
                                   IEventStoreConnection eventStoreConnection,
                                   IEventStoreConfigurations eventStoreConfigurations,
                                   IStreamNameProvider streamNameProvider,
                                   IEventSerializer eventSerializer)
 {
     EventDeserializer        = eventDeserializer;
     EventStoreConnection     = eventStoreConnection;
     EventStoreConfigurations = eventStoreConfigurations;
     StreamNameProvider       = streamNameProvider;
     EventSerializer          = eventSerializer;
 }
Ejemplo n.º 2
0
 internal SubscriptionManager(IEventStoreConnection connection,
                              ICheckpointStore checkpointStore,
                              ProjectionHandler[] projections,
                              ISnapshotter[] snapshotters,
                              IEventDeserializer eventDeserializer,
                              IEventStoreConfigurations configurations)
 {
     _connection        = connection ?? throw new ArgumentNullException(nameof(connection));
     _configurations    = configurations ?? throw new ArgumentNullException(nameof(configurations));
     _projections       = projections ?? throw new ArgumentNullException(nameof(projections));
     _snapshotters      = snapshotters ?? throw new ArgumentNullException(nameof(snapshotters));
     _checkpointStore   = checkpointStore ?? throw new ArgumentNullException(nameof(checkpointStore));
     _eventDeserializer = eventDeserializer ?? throw new ArgumentNullException(nameof(eventDeserializer));
 }
Ejemplo n.º 3
0
 private static IServiceCollection RegisterSnapshotableRepositories(this IServiceCollection services, IEventStoreConfigurations configurations) =>
 configurations.IsSnapshottingOn ? services.AddScoped(typeof(IAggregateRootRepository <>), typeof(SnapshotableRootRepository <>))
                                  : services;