/// <summary>
 /// Initializes a new instance of the <see cref="AsyncSnapshotReader"/> class.
 /// </summary>
 /// <param name="connection">The event store connection to use.</param>
 /// <param name="configuration">The configuration to use.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="connection"/> or <paramref name="configuration"/> are <c>null</c>.</exception>
 public AsyncSnapshotReader(IEventStoreConnection connection, SnapshotReaderConfiguration configuration)
 {
     if (connection == null) throw new ArgumentNullException("connection");
     if (configuration == null) throw new ArgumentNullException("configuration");
     _connection = connection;
     _configuration = configuration;
 }
 public RepositoryScenarioBuilder()
 {
     _connection = EmbeddedEventStore.Connection;
     _unitOfWork = new UnitOfWork();
     _concurrentUnitOfWork = new ConcurrentUnitOfWork();
     _eventReaderConfiguration = EventReaderConfigurationFactory.Create();
     _snapshotReaderConfiguration = SnapshotReaderConfigurationFactory.Create();
     _eventStoreSchedule = new List<Action<IEventStoreConnection>>();
     _unitOfWorkSchedule = new List<Action<UnitOfWork>>();
     _concurrentUnitOfWorkSchedule = new List<Action<ConcurrentUnitOfWork>>();
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SnapshotReader"/> class.
 /// </summary>
 /// <param name="connection">The event store connection to use.</param>
 /// <param name="configuration">The configuration to use.</param>
 /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="connection"/> or <paramref name="configuration"/> are <c>null</c>.</exception>
 public SnapshotReader(IEventStoreConnection connection, SnapshotReaderConfiguration configuration)
 {
     if (connection == null)
     {
         throw new ArgumentNullException("connection");
     }
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     _connection    = connection;
     _configuration = configuration;
 }
 public static SnapshotReader Create(IEventStoreConnection connection, SnapshotReaderConfiguration configuration)
 {
     return new SnapshotReader(connection, configuration);
 }
 public static SnapshotReader CreateWithConfiguration(SnapshotReaderConfiguration configuration)
 {
     return Create(EmbeddedEventStore.Connection, configuration);
 }
Пример #6
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="AsyncSnapshotReader" /> class.
 /// </summary>
 /// <param name="connection">The event store connection to use.</param>
 /// <param name="configuration">The configuration to use.</param>
 /// <exception cref="System.ArgumentNullException">
 ///     Thrown when <paramref name="connection" /> or
 ///     <paramref name="configuration" /> are <c>null</c>.
 /// </exception>
 public AsyncSnapshotReader(IEventStoreConnection connection, SnapshotReaderConfiguration configuration)
 {
     Connection    = connection ?? throw new ArgumentNullException(nameof(connection));
     Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
 }