internal static EventStoreOnlyPersistence New(SqlEventStoreConfiguration eventStoreConfiguration, DatabaseFixture database) { return(new EventStoreOnlyPersistence( new SqlMessageQueueConfigurationBuilder().HasConnectionString(database.ConnectionString).CreateConfiguration(), eventStoreConfiguration, new SqlSagaStorageConfigurationBuilder().HasConnectionString(database.ConnectionString).CreateConfiguration())); }
EventStoreOnlyPersistence( SqlMessageQueueConfiguration messageQueueConfiguration, SqlEventStoreConfiguration eventStoreConfiguration, SqlSagaStorageConfiguration sagaStorageConfiguration) : base(messageQueueConfiguration, eventStoreConfiguration, sagaStorageConfiguration) { }
internal SqlBuilder(SqlEventStoreConfiguration eventStore, SqlSnapshotConfiguration snapshots) { Contract.Requires(eventStore != null); Contract.Requires(snapshots != null); EventStore = new EventStoreSqlBuilder(eventStore.TableName); Snapshots = new SnapshotSqlBuilder(snapshots.TableName); }
/// <summary> /// Initializes a new instance of the <see cref="SqlEventStore{TKey}"/> class. /// </summary> /// <param name="persistence">The <see cref="IPersistence">persistence</see> associated with the event store.</param> /// <param name="configuration">The <see cref="SqlEventStoreConfiguration">configuration</see> used by the event store.</param> public SqlEventStore(IPersistence persistence, SqlEventStoreConfiguration configuration) : base(persistence) { Arg.NotNull(configuration, nameof(configuration)); Arg.NotNullOrEmpty(configuration.EntityName, nameof(configuration.EntityName)); Configuration = configuration; Snapshots = configuration.CreateSnapshotStore <TKey>(); snapshotSerializer = new SnapshotSerializer(typeof(TKey), configuration); }
internal SnapshotSerializer(Type keyType, SqlEventStoreConfiguration configuration) { Contract.Requires(keyType != null); Contract.Requires(configuration != null); this.keyType = keyType; this.configuration = configuration; snapshotOfTTypeInfo = typeof(ISnapshot <>).MakeGenericType(keyType).GetTypeInfo(); }
public AbstractDeserializerFactory(SqlEventStoreConfiguration configuration) => serializer = configuration.NewMessageSerializer <TSnapshot>();
/// <summary> /// Initializes a new instance of the <see cref="SqlSnapshotStore"/> class. /// </summary> /// <param name="configuration">The <see cref="SqlEventStoreConfiguration">configuration</see> used by the snapshot store.</param> public SqlSnapshotStore(SqlEventStoreConfiguration configuration) : base(configuration) { }
/// <summary> /// Initializes a new instance of the <see cref="SqlSnapshotStore{TKey}"/> class. /// </summary> /// <param name="configuration">The <see cref="SqlEventStoreConfiguration">configuration</see> used by the snapshot store.</param> public SqlSnapshotStore(SqlEventStoreConfiguration configuration) { Arg.NotNull(configuration, nameof(configuration)); Configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="SqlEventStore"/> class. /// </summary> /// <param name="persistence">The <see cref="IPersistence">persistence</see> associated with the event store.</param> /// <param name="configuration">The <see cref="SqlEventStoreConfiguration">configuration</see> used by the event store.</param> public SqlEventStore(IPersistence persistence, SqlEventStoreConfiguration configuration) : base(persistence, configuration) { }