├── .devcontainer ├── devcontainer.json ├── docker-compose.yml └── dockerfile ├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ ├── codeql-analysis.yaml │ ├── docs.yaml │ ├── pipeline.yaml │ ├── pull-requests.yaml │ ├── release.yaml │ ├── stale.yaml │ └── test-reports.yaml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CONTRIBUTORS.md ├── Documentation ├── CNAME ├── additional │ ├── configuration.md │ ├── dos-and-donts.md │ ├── event-naming-strategies.md │ ├── faq.md │ ├── snapshots.md │ ├── source-generation.md │ ├── specifications.md │ └── value-objects.md ├── assets │ └── logo.png ├── basics │ ├── aggregates.md │ ├── commands.md │ ├── event-upgrade.md │ ├── identity.md │ ├── jobs.md │ ├── metadata.md │ ├── queries.md │ ├── sagas.md │ └── subscribers.md ├── getting-started.md ├── images │ └── logo-with-contour.svg ├── index.md ├── integration │ ├── event-stores.md │ ├── mongodb.md │ ├── mssql.md │ ├── postgresql.md │ ├── rabbitmq.md │ ├── read-stores.md │ └── redis.md └── migrations │ └── v0-to-v1.md ├── EventFlow.sln ├── EventFlow.sln.DotSettings ├── LICENSE ├── README.md ├── RELEASE_NOTES.md ├── Resources ├── jetbrains-128x128.png ├── with-contour-256x256.png ├── with-contour.svg ├── without-contour-256x256.png └── without-contour.svg ├── Source ├── Directory.Build.props ├── EventFlow.AspNetCore.Tests │ ├── EventFlow.AspNetCore.Tests.csproj │ └── IntegrationTests │ │ └── Site │ │ ├── DefaultConfigurationTests.cs │ │ ├── ModelBindingTests.cs │ │ ├── SiteTestsBase.cs │ │ ├── TestAuthenticationMiddleware.cs │ │ └── ThingyController.cs ├── EventFlow.AspNetCore │ ├── Configuration │ │ ├── EventFlowJsonOptionsMvcConfiguration.cs │ │ └── EventFlowModelBindingMvcConfiguration.cs │ ├── EventFlow.AspNetCore.csproj │ ├── EventFlowAspNetCore.cs │ ├── Extensions │ │ ├── AspNetCoreEventFlowOptions.cs │ │ └── EventFlowOptionsExtensions.cs │ ├── Logging │ │ └── AspNetCoreLoggerLog.cs │ ├── MetadataProviders │ │ ├── AddRequestHeadersMetadataProvider.cs │ │ ├── AddUriMetadataProvider.cs │ │ ├── AddUserClaimsMetadataProvider.cs │ │ ├── AddUserHostAddressMetadataProvider.cs │ │ ├── DefaultUserClaimsMetadataOptions.cs │ │ └── IUserClaimsMetadataOptions.cs │ ├── Middlewares │ │ └── CommandPublishMiddleware.cs │ ├── ModelBinding │ │ ├── SingleValueModelBinder.cs │ │ └── SingleValueModelBinderProvider.cs │ └── ServiceProvider │ │ └── HostedBootstrapper.cs ├── EventFlow.CodeStyle.Tests │ ├── EventFlow.CodeStyle.Tests.csproj │ └── EventFlowCodeStyleUnitTests.cs ├── EventFlow.CodeStyle │ ├── EventFlow.CodeStyle.csproj │ ├── TestCategoryAttributeAnalyzer.cs │ └── TestCategoryAttributeCodeFixProvider.cs ├── EventFlow.Elasticsearch.Tests │ ├── EventFlow.Elasticsearch.Tests.csproj │ ├── IntegrationTests │ │ ├── ElasticsearchReadModelStoreTests.cs │ │ ├── QueryHandlers │ │ │ ├── ElasticsearchThingyGetMessagesQueryHandler.cs │ │ │ ├── ElasticsearchThingyGetQueryHandler.cs │ │ │ └── ElasticsearchThingyGetVersionQueryHandler.cs │ │ └── ReadModels │ │ │ ├── ElasticsearchThingyMessageReadModel.cs │ │ │ └── ElasticsearchThingyReadModel.cs │ ├── UnitTests │ │ └── ReadModelDescriptionProviderTests.cs │ └── app.config ├── EventFlow.Elasticsearch │ ├── EventFlow.Elasticsearch.csproj │ ├── Extensions │ │ └── EventFlowOptionsExtensions.cs │ ├── ReadStores │ │ ├── ElasticsearchReadModelStore.cs │ │ ├── IElasticsearchReadModelStore.cs │ │ ├── IReadModelDescriptionProvider.cs │ │ └── ReadModelDescriptionProvider.cs │ └── ValueObjects │ │ ├── IndexName.cs │ │ └── ReadModelDescription.cs ├── EventFlow.EntityFramework.Tests │ ├── EntityFrameworkTestExtensions.cs │ ├── EventFlow.EntityFramework.Tests.csproj │ ├── InMemory │ │ ├── EfInMemoryEventStoreTests.cs │ │ ├── EfInMemoryReadStoreTests.cs │ │ ├── EfInMemorySnapshotTests.cs │ │ ├── InMemoryDbContextProvider.cs │ │ └── Infrastructure │ │ │ ├── IndexingInMemoryTable.cs │ │ │ └── IndexingInMemoryTableFactory.cs │ ├── Model │ │ ├── EfThingyGetMessagesQueryHandler.cs │ │ ├── EfThingyGetQueryHandler.cs │ │ ├── EfThingyGetVersionQueryHandler.cs │ │ ├── TestDbContext.cs │ │ ├── ThingyMessageReadModelEntity.cs │ │ └── ThingyReadModelEntity.cs │ ├── MsSql │ │ ├── EfMsSqlEventStoreTests.cs │ │ ├── EfMsSqlReadStoreIncludeTests.cs │ │ ├── EfMsSqlReadStoreTests.cs │ │ ├── EfMsSqlSnapshotTests.cs │ │ ├── IncludeTests │ │ │ ├── Address.cs │ │ │ ├── AddressId.cs │ │ │ ├── Commands │ │ │ │ ├── AddAddressCommand.cs │ │ │ │ └── CreatePersonCommand.cs │ │ │ ├── Events │ │ │ │ ├── AddressAddedEvent.cs │ │ │ │ └── PersonCreatedEvent.cs │ │ │ ├── Person.cs │ │ │ ├── PersonAggregate.cs │ │ │ ├── PersonId.cs │ │ │ ├── Queries │ │ │ │ └── PersonGetQuery.cs │ │ │ └── ReadModels │ │ │ │ ├── AddressReadModelEntity.cs │ │ │ │ └── PersonReadModelEntity.cs │ │ └── MsSqlDbContextProvider.cs │ ├── PostgreSql │ │ ├── EfPostgreSqlEventStoreTests.cs │ │ ├── EfPostgreSqlReadStoreTests.cs │ │ ├── EfPostgreSqlSnapshotTests.cs │ │ └── PostgreSqlDbContextProvider.cs │ └── SQLite │ │ ├── EfSqliteEventStoreTests.cs │ │ ├── EfSqliteReadStoreTests.cs │ │ ├── EfSqliteSnapshotTests.cs │ │ └── SqliteDbContextProvider.cs ├── EventFlow.EntityFramework │ ├── DefaultBulkOperationConfiguration.cs │ ├── DefaultUniqueConstraintDetectionStrategy.cs │ ├── EntityFrameworkConfiguration.cs │ ├── EntityFrameworkReadModelConfiguration.cs │ ├── EntityFrameworkReadModelConfigurationExtensions.cs │ ├── EventFlow.EntityFramework.csproj │ ├── EventStores │ │ ├── EntityFrameworkEventPersistence.cs │ │ └── EventEntity.cs │ ├── Extensions │ │ ├── DbContextExtensions.cs │ │ ├── EventFlowOptionsEntityFrameworkExtensions.cs │ │ ├── ExceptionExtensions.cs │ │ └── ModelBuilderExtensions.cs │ ├── IBulkOperationConfiguration.cs │ ├── IDbContextProvider.cs │ ├── IEntityFrameworkConfiguration.cs │ ├── IUniqueConstraintDetectionStrategy.cs │ ├── ReadStores │ │ ├── Configuration │ │ │ ├── IApplyQueryableConfiguration.cs │ │ │ ├── IApplyQueryableIncludeConfiguration.cs │ │ │ └── Includes │ │ │ │ ├── IncludeExpression.cs │ │ │ │ ├── IncludeString.cs │ │ │ │ ├── ThenIncludeEnumerableExpression.cs │ │ │ │ └── ThenIncludeExpression.cs │ │ ├── EntityFrameworkReadModelStore.cs │ │ └── IEntityFrameworkReadModelStore.cs │ └── SnapshotStores │ │ ├── EntityFrameworkSnapshotPersistence.cs │ │ └── SnapshotEntity.cs ├── EventFlow.EventStores.EventStore.Tests │ ├── EventFlow.EventStores.EventStore.Tests.csproj │ ├── IntegrationTests │ │ └── EventStoreEventStoreTests.cs │ └── app.config ├── EventFlow.EventStores.EventStore │ ├── EventFlow.EventStores.EventStore.csproj │ ├── EventStoreEventPersistence.cs │ └── Extensions │ │ └── EventFlowOptionsExtensions.cs ├── EventFlow.Examples.Shipping.Queries.InMemory │ ├── Cargos │ │ ├── CargoReadModel.cs │ │ └── QueryHandlers │ │ │ ├── GetCargosDependentOnVoyageQueryHandler.cs │ │ │ └── GetCargosQueryHandler.cs │ ├── EventFlow.Examples.Shipping.Queries.InMemory.csproj │ ├── EventFlowExamplesShippingQueriesInMemory.cs │ └── Voyage │ │ ├── QueryHandlers │ │ ├── GetAllVoyagesQueryHandler.cs │ │ └── GetVoyagesQueryHandler.cs │ │ └── VoyageReadModel.cs ├── EventFlow.Examples.Shipping.Tests │ ├── EventFlow.Examples.Shipping.Tests.csproj │ ├── IntegrationTests │ │ └── Scenarios.cs │ ├── Locations.cs │ ├── UnitTests │ │ ├── Domain │ │ │ └── Model │ │ │ │ └── CargoModel │ │ │ │ └── Speficications │ │ │ │ └── TransportLegsAreConnectedSpecificationTests.cs │ │ └── ExternalServices │ │ │ └── Routing │ │ │ └── RoutingServiceTests.cs │ ├── Voyages.cs │ └── app.config ├── EventFlow.Examples.Shipping │ ├── Application │ │ ├── BookingApplicationService.cs │ │ ├── IBookingApplicationService.cs │ │ ├── IScheduleApplicationService.cs │ │ └── ScheduleApplicationService.cs │ ├── Domain │ │ ├── Model │ │ │ ├── CargoModel │ │ │ │ ├── Cargo.cs │ │ │ │ ├── CargoAggregate.cs │ │ │ │ ├── CargoId.cs │ │ │ │ ├── CargoState.cs │ │ │ │ ├── Commands │ │ │ │ │ ├── CargoBookCommand.cs │ │ │ │ │ └── CargoSetItineraryCommand.cs │ │ │ │ ├── Entities │ │ │ │ │ ├── TransportLeg.cs │ │ │ │ │ └── TransportLegId.cs │ │ │ │ ├── Events │ │ │ │ │ ├── CargoBookedEvent.cs │ │ │ │ │ └── CargoItinerarySetEvent.cs │ │ │ │ ├── Jobs │ │ │ │ │ ├── VerifyCargoItineraryJob.cs │ │ │ │ │ └── VerifyCargosForVoyageJob.cs │ │ │ │ ├── Queries │ │ │ │ │ ├── GetCargoQuery.cs │ │ │ │ │ └── GetCargosDependentOnVoyageQuery.cs │ │ │ │ ├── Specifications │ │ │ │ │ ├── RouteSpecification.cs │ │ │ │ │ └── TransportLegsAreConnectedSpecification.cs │ │ │ │ ├── Subscribers │ │ │ │ │ └── ScheduleChangedSubscriber.cs │ │ │ │ └── ValueObjects │ │ │ │ │ ├── Itinerary.cs │ │ │ │ │ └── Route.cs │ │ │ ├── LocationModel │ │ │ │ ├── Events │ │ │ │ │ └── LocationCreatedEvent.cs │ │ │ │ ├── Location.cs │ │ │ │ ├── LocationAggregate.cs │ │ │ │ ├── LocationId.cs │ │ │ │ └── LocationState.cs │ │ │ └── VoyageModel │ │ │ │ ├── Commands │ │ │ │ ├── VoyageCreateCommand.cs │ │ │ │ └── VoyageDelayCommand.cs │ │ │ │ ├── Entities │ │ │ │ ├── CarrierMovement.cs │ │ │ │ └── CarrierMovementId.cs │ │ │ │ ├── Events │ │ │ │ ├── VoyageCreatedEvent.cs │ │ │ │ └── VoyageScheduleUpdatedEvent.cs │ │ │ │ ├── Queries │ │ │ │ ├── GetAllVoyagesQuery.cs │ │ │ │ └── GetVoyagesQuery.cs │ │ │ │ ├── ScheduleBuilder.cs │ │ │ │ ├── ValueObjects │ │ │ │ └── Schedule.cs │ │ │ │ ├── Voyage.cs │ │ │ │ ├── VoyageAggregate.cs │ │ │ │ ├── VoyageId.cs │ │ │ │ └── VoyageState.cs │ │ ├── Services │ │ │ ├── IUpdateItineraryService.cs │ │ │ └── UpdateItineraryService.cs │ │ └── Specs.cs │ ├── EventFlow.Examples.Shipping.csproj │ ├── EventFlowExamplesShipping.cs │ ├── Extensions │ │ ├── CarrierMovementExtensions.cs │ │ └── DateTimeOffsetExtensions.cs │ └── ExternalServices │ │ └── Routing │ │ ├── IRoutingService.cs │ │ └── RoutingService.cs ├── EventFlow.Hangfire.Tests │ ├── EventFlow.Hangfire.Tests.csproj │ ├── Integration │ │ ├── HangfireJobLog.cs │ │ └── HangfireJobSchedulerTests.cs │ └── app.config ├── EventFlow.Hangfire │ ├── EventFlow.Hangfire.csproj │ ├── Extensions │ │ └── EventFlowOptionsHangfireExtensions.cs │ └── Integration │ │ ├── EventFlowHangfireOptions.cs │ │ ├── HangfireJobId.cs │ │ ├── HangfireJobRunner.cs │ │ ├── HangfireJobScheduler.cs │ │ ├── IEventFlowHangfireOptions.cs │ │ ├── IHangfireJobRunner.cs │ │ ├── IQueueNameProvider.cs │ │ └── QueueNameProvider.cs ├── EventFlow.MongoDB.Tests │ ├── EventFlow.MongoDB.Tests.csproj │ ├── IntegrationTests │ │ ├── EventStores │ │ │ └── MongoDbEventStoreTests.cs │ │ ├── ReadStores │ │ │ ├── MongoDbReadModelStoreTests.cs │ │ │ ├── Queries │ │ │ │ └── MongoDbThingyGetWithLinqQuery.cs │ │ │ ├── QueryHandlers │ │ │ │ ├── MongoDbThingyGetMessagesQueryHandler.cs │ │ │ │ ├── MongoDbThingyGetQueryHandler.cs │ │ │ │ ├── MongoDbThingyGetVersionQueryHandler.cs │ │ │ │ └── MongoDbThingyGetWithLinqQueryHandler.cs │ │ │ └── ReadModels │ │ │ │ ├── MongoDbThingyMessageReadModel.cs │ │ │ │ └── MongoDbThingyReadModel.cs │ │ └── SnapshotStores │ │ │ └── MongoDBSnapshotStoreTests.cs │ └── app.config ├── EventFlow.MongoDB │ ├── EventFlow.MongoDB.csproj │ ├── EventStore │ │ ├── IMongoDbEventPersistenceInitializer.cs │ │ ├── IMongoDbEventSequenceStore.cs │ │ ├── MongoDbEventPersistence.cs │ │ ├── MongoDbEventPersistenceInitializer.cs │ │ └── MongoDbEventSequenceStore.cs │ ├── Extensions │ │ ├── EventFlowOptionsMongoDbEventStoreExtensions.cs │ │ ├── EventFlowOptionsSnapshotExtensions.cs │ │ └── MongoDbOptionsExtensions.cs │ ├── ReadStores │ │ ├── Attributes │ │ │ ├── MongoDbCollectionNameAttribute.cs │ │ │ └── MongoDbGeoSpatialIndexAttribute.cs │ │ ├── IMongoDbReadModel.cs │ │ ├── IMongoDbReadModelStore.cs │ │ ├── IReadModelDescriptionProvider.cs │ │ ├── MongoDbReadModelStore.cs │ │ └── ReadModelDescriptionProvider.cs │ ├── SnapshotStores │ │ └── MongoDbSnapshotPersistence.cs │ └── ValueObjects │ │ ├── MongoDbCounterDataModel.cs │ │ ├── MongoDbEventDataModel.cs │ │ ├── MongoDbSnapshotDataModel.cs │ │ ├── ReadModelDescription.cs │ │ └── RootCollectionName.cs ├── EventFlow.MsSql.Tests │ ├── EventFlow.MsSql.Tests.csproj │ ├── Extensions │ │ └── MsSqlDatabaseExtensions.cs │ └── IntegrationTests │ │ ├── EventStores │ │ ├── EventFlowEventStoresMsSqlTests.cs │ │ ├── MsSqlEventStoreTests.cs │ │ └── MsSqlScriptsTests.cs │ │ ├── IdentityIndexFragmentationTests.cs │ │ ├── ReadStores │ │ ├── MsSqlReadModelStoreTests.cs │ │ ├── QueryHandlers │ │ │ ├── MsSqlThingyGetMessagesQueryHandler.cs │ │ │ ├── MsSqlThingyGetQueryHandler.cs │ │ │ └── MsSqlThingyGetVersionQueryHandler.cs │ │ ├── ReadModels │ │ │ ├── MsSqlThingyMessageReadModel.cs │ │ │ ├── MsSqlThingyReadModel.cs │ │ │ └── MultipleMsSqlDatabasesTests.cs │ │ └── Scripts │ │ │ ├── 0001 - Create table ReadModel-ThingyAggregate.sql │ │ │ └── 0002 - Create table ReadModel-ThingyMessage.sql │ │ └── SnapshotStores │ │ ├── EventFlowSnapshotStoresMsSqlTests.cs │ │ └── MsSqlSnapshotStoreTests.cs ├── EventFlow.MsSql │ ├── Connections │ │ ├── IMsSqlConnectionFactory.cs │ │ └── MsSqlConnectionFactory.cs │ ├── EventFlow.MsSql.csproj │ ├── EventStores │ │ ├── EventFlowEventStoresMsSql.cs │ │ ├── MsSqlEventPersistence.cs │ │ └── Scripts │ │ │ ├── 0001 - Create table EventFlow.sql │ │ │ └── 0002 - Create eventdatamodel_list_type.sql │ ├── Extensions │ │ ├── EventFlowOptionsMsSqlEventStoreExtensions.cs │ │ ├── EventFlowOptionsMsSqlExtensions.cs │ │ ├── EventFlowOptionsMsSqlReadStoreExtensions.cs │ │ └── EventFlowOptionsSnapshotExtensions.cs │ ├── IMsSqlConfiguration.cs │ ├── IMsSqlConnection.cs │ ├── IMsSqlDatabaseMigrator.cs │ ├── Integrations │ │ └── TableParameter.cs │ ├── MsSqlConfiguration.cs │ ├── MsSqlConnection.cs │ ├── MsSqlDatabaseMigrator.cs │ ├── ReadStores │ │ ├── IMssqlReadModel.cs │ │ ├── IMssqlReadModelStore.cs │ │ ├── MssqlReadModel.cs │ │ └── MssqlReadModelStore.cs │ ├── RetryStrategies │ │ ├── IMsSqlErrorRetryStrategy.cs │ │ └── MsSqlErrorRetryStrategy.cs │ └── SnapshotStores │ │ ├── EventFlowSnapshotStoresMsSql.cs │ │ ├── MsSqlSnapshotPersistence.cs │ │ └── Scripts │ │ └── 0001 - Create EventFlowSnapshots.sql ├── EventFlow.PostgreSql.Tests │ ├── EventFlow.PostgreSql.Tests.csproj │ ├── IntegrationTests │ │ ├── EventStores │ │ │ ├── EventFlowEventStoresPostgresSqlTests.cs │ │ │ ├── PostgresSqlEventStoreTests.cs │ │ │ └── PostgresSqlScriptsTests.cs │ │ ├── ReadStores │ │ │ ├── PostgresSqlReadModelStoreTests.cs │ │ │ ├── QueryHandlers │ │ │ │ ├── PostgresSqlThingyGetMessagesQueryHandler.cs │ │ │ │ ├── PostgresSqlThingyGetQueryHandler.cs │ │ │ │ └── PostgresSqlThingyGetVersionQueryHandler.cs │ │ │ ├── ReadModels │ │ │ │ ├── PostgresSqlThingyMessageReadModel.cs │ │ │ │ └── PostgresSqlThingyReadModel.cs │ │ │ └── Scripts │ │ │ │ ├── 0001 - Create table ReadModel-ThingyAggregate.sql │ │ │ │ └── 0002 - Create table ReadModel-ThingyMessage.sql │ │ └── SnapshotStores │ │ │ ├── EventFlowSnapshotStoresPostgresSqlTests.cs │ │ │ └── PostgresSqlSnapshotStoreTests.cs │ ├── TestHelpers │ │ ├── IPostgresSqlDatabase.cs │ │ ├── PostgresSqlConnectionString.cs │ │ ├── PostgresSqlHelpz.cs │ │ └── PostgressSqlDatabase.cs │ └── app.config ├── EventFlow.PostgreSql │ ├── Connections │ │ ├── IPostgresSqlConfiguration.cs │ │ ├── IPostgresSqlConnection.cs │ │ ├── IPostgresSqlConnectionFactory.cs │ │ ├── PostgresSqlConfiguration.cs │ │ ├── PostgresSqlConnection.cs │ │ └── PostgresSqlConnectionFactory.cs │ ├── EventFlow.PostgreSql.csproj │ ├── EventStores │ │ ├── EventFlowEventStoresPostgresSql.cs │ │ ├── PostgresSqlEventPersistence.cs │ │ └── Scripts │ │ │ ├── 0001 - Create table EventFlow.sql │ │ │ └── 0002 - Create eventdatamodel_list_type.sql │ ├── Extensions │ │ ├── EventFlowOptionsPostgresSqlEventStoreExtensions.cs │ │ ├── EventFlowOptionsPostgresSqlExtensions.cs │ │ ├── EventFlowOptionsPostgresSqlReadStoreExtensions.cs │ │ └── EventFlowOptionsSnapshotExtensions.cs │ ├── IPostgresSqlDatabaseMigrator.cs │ ├── PostgresSqlDatabaseMigrator.cs │ ├── ReadModels │ │ └── PostgresReadModelSqlGenerator.cs │ ├── ReadStores │ │ ├── Attributes │ │ │ ├── PostgresSqlReadModelIdentityColumnAttribute.cs │ │ │ ├── PostgresSqlReadModelIgnoreColumnAttribute.cs │ │ │ └── PostgresSqlReadModelVersionColumnAttribute.cs │ │ ├── IPostgresReadModelStore.cs │ │ ├── IPostgressqlReadModel.cs │ │ ├── PostgresSqlReadModelStore.cs │ │ └── PostgressqlReadModel.cs │ ├── RetryStrategies │ │ ├── IPostgresSqlErrorRetryStrategy.cs │ │ └── PostgresSqlErrorRetryStrategy.cs │ └── SnapshotStores │ │ ├── EventFlowSnapshotStoresPostGresSql.cs │ │ ├── PostgresSqlSnapshotPersistence.cs │ │ └── Scripts │ │ └── 0001 - Create EventFlowSnapshots.sql ├── EventFlow.RabbitMQ.Tests │ ├── EventFlow.RabbitMQ.Tests.csproj │ ├── Integration │ │ └── RabbitMqTests.cs │ ├── RabbitMqConsumer.cs │ ├── UnitTests │ │ └── Integrations │ │ │ └── RabbitMqPublisherTests.cs │ └── app.config ├── EventFlow.RabbitMQ │ ├── EventFlow.RabbitMQ.csproj │ ├── Exchange.cs │ ├── Extensions │ │ └── EventFlowOptionsRabbitMqExtensions.cs │ ├── IRabbitMqConfiguration.cs │ ├── Integrations │ │ ├── IRabbitConnection.cs │ │ ├── IRabbitMqConnectionFactory.cs │ │ ├── IRabbitMqMessageFactory.cs │ │ ├── IRabbitMqPublisher.cs │ │ ├── IRabbitMqRetryStrategy.cs │ │ ├── RabbitConnection.cs │ │ ├── RabbitMqConnectionFactory.cs │ │ ├── RabbitMqMessage.cs │ │ ├── RabbitMqMessageFactory.cs │ │ ├── RabbitMqPublisher.cs │ │ └── RabbitMqRetryStrategy.cs │ ├── MessageId.cs │ ├── RabbitMqConfiguration.cs │ ├── RabbitMqDomainEventPublisher.cs │ └── RoutingKey.cs ├── EventFlow.Redis.Tests │ ├── EventFlow.Redis.Tests.csproj │ ├── Integration │ │ ├── EventStore │ │ │ └── EventStoreTests.cs │ │ ├── ReadStore │ │ │ ├── QueryHandlers │ │ │ │ ├── RedisThingyGetMessagesQueryHandler.cs │ │ │ │ ├── RedisThingyGetQueryHandler.cs │ │ │ │ └── RedisThingyGetVersionQueryHandler.cs │ │ │ ├── ReadModels │ │ │ │ ├── RedisThingyMessageReadModel.cs │ │ │ │ └── RedisThingyReadModel.cs │ │ │ └── RedisReadStoreTests.cs │ │ └── SnapshotStore │ │ │ └── SnapshotStoreTests.cs │ └── Unit │ │ ├── HashBuilderTests.cs │ │ └── PrefixedKeyTests.cs ├── EventFlow.Redis │ ├── Constants.cs │ ├── EventFlow.Redis.csproj │ ├── EventStore │ │ ├── EventStreamCollectionResolver.cs │ │ ├── IEventStreamCollectionResolver.cs │ │ ├── RedisCommittedDomainEvent.cs │ │ └── RedisEventPersistence.cs │ ├── Extensions.cs │ ├── PrefixedKey.cs │ ├── ReadStore │ │ ├── Extensions.cs │ │ ├── IRedisHashBuilder.cs │ │ ├── RedisHashBuilder.cs │ │ ├── RedisQueryHandler.cs │ │ ├── RedisReadModel.cs │ │ └── RedisReadModelStore.cs │ └── SnapshotStore │ │ ├── RedisSnapshot.cs │ │ ├── RedisSnapshotPersistence.cs │ │ └── SnapshotId.cs ├── EventFlow.SQLite.Tests │ ├── EventFlow.SQLite.Tests.csproj │ ├── IntegrationTests │ │ ├── EventStores │ │ │ └── SQLiteEventStoreTests.cs │ │ └── ReadStores │ │ │ ├── QueryHandlers │ │ │ ├── SQLiteThingyGetMessagesQueryHandler.cs │ │ │ ├── SQLiteThingyGetQueryHandler.cs │ │ │ └── SQLiteThingyGetVersionQueryHandler.cs │ │ │ ├── ReadModels │ │ │ ├── SQLiteThingyMessageReadModel.cs │ │ │ └── SQliteThingyReadModel.cs │ │ │ └── SQLiteReadStoreTests.cs │ └── app.config ├── EventFlow.SQLite │ ├── Connections │ │ ├── ISQLiteConfiguration.cs │ │ ├── ISQLiteConnection.cs │ │ ├── ISQLiteConnectionFactory.cs │ │ ├── SQLiteConfiguration.cs │ │ ├── SQLiteConnection.cs │ │ └── SQLiteConnectionFactory.cs │ ├── EventFlow.SQLite.csproj │ ├── EventStores │ │ └── SQLiteEventPersistence.cs │ ├── Extensions │ │ └── EventFlowOptionsExtensions.cs │ ├── ReadStores │ │ ├── ISQLiteReadModelStore.cs │ │ └── SQLiteReadModelStore.cs │ └── RetryStrategies │ │ ├── ISQLiteErrorRetryStrategy.cs │ │ └── SQLiteErrorRetryStrategy.cs ├── EventFlow.SourceGenerators.Tests │ ├── EventFlow.SourceGenerators.Tests.csproj │ └── Unit │ │ ├── AggregateSourceGeneratorTests.cs │ │ └── TestAggregate.cs ├── EventFlow.SourceGenerators │ ├── AggregateExtensionsAttributeGenerator.cs │ ├── AggregateExtensionsSourceGenerator.cs │ └── EventFlow.SourceGenerators.csproj ├── EventFlow.Sql.Tests │ ├── EventFlow.Sql.Tests.csproj │ ├── UnitTests │ │ └── ReadModels │ │ │ └── ReadModelSqlGeneratorTests.cs │ └── app.config ├── EventFlow.Sql │ ├── Connections │ │ ├── ISqlConfiguration.cs │ │ ├── ISqlConnection.cs │ │ ├── ISqlConnectionFactory.cs │ │ ├── SqlConfiguration.cs │ │ └── SqlConnection.cs │ ├── EventFlow.Sql.csproj │ ├── Exceptions │ │ └── SqlMigrationException.cs │ ├── Extensions │ │ ├── AssemblyExtensions.cs │ │ ├── ReadModelExtensions.cs │ │ └── SqlStringExtensions.cs │ ├── Integrations │ │ └── DbUpUpgradeLog.cs │ ├── Migrations │ │ ├── ISqlDatabaseMigrator.cs │ │ ├── SqlDatabaseMigrator.cs │ │ └── SqlScript.cs │ └── ReadModels │ │ ├── Attributes │ │ ├── SqlReadModelConnectionStringNameAttribute.cs │ │ ├── SqlReadModelIdentityColumnAttribute.cs │ │ ├── SqlReadModelIgnoreColumnAttribute.cs │ │ └── SqlReadModelVersionColumnAttribute.cs │ │ ├── IReadModelSqlGenerator.cs │ │ ├── ISqlReadModelStore.cs │ │ ├── ReadModelSqlGenerator.cs │ │ ├── ReadModelSqlGeneratorConfiguration.cs │ │ └── SqlReadModelStore.cs ├── EventFlow.TestHelpers │ ├── Aggregates │ │ ├── Commands │ │ │ ├── ThingyAddMessageAndPingCommand.cs │ │ │ ├── ThingyAddMessageCommand.cs │ │ │ ├── ThingyAddMessageHistoryCommand.cs │ │ │ ├── ThingyDeleteCommand.cs │ │ │ ├── ThingyDomainErrorAfterFirstCommand.cs │ │ │ ├── ThingyEmitUpgradableEventsCommand.cs │ │ │ ├── ThingyImportCommand.cs │ │ │ ├── ThingyMaybePingCommand.cs │ │ │ ├── ThingyMultiplePingsCommand.cs │ │ │ ├── ThingyNopCommand.cs │ │ │ ├── ThingyPingCommand.cs │ │ │ ├── ThingyRequestSagaCompleteCommand.cs │ │ │ ├── ThingyRequestSagaStartCommand.cs │ │ │ └── ThingyThrowExceptionInSagaCommand.cs │ │ ├── Decorators │ │ │ └── SomeCommandHandlerDecorator.cs │ │ ├── Entities │ │ │ ├── ThingyMessage.cs │ │ │ ├── ThingyMessageId.cs │ │ │ └── ThingyMessageLocator.cs │ │ ├── Events │ │ │ ├── ThingyDeletedEvent.cs │ │ │ ├── ThingyDomainErrorAfterFirstEvent.cs │ │ │ ├── ThingyMessageAddedEvent.cs │ │ │ ├── ThingyMessageHistoryAddedEvent.cs │ │ │ ├── ThingyPingEvent.cs │ │ │ ├── ThingySagaCompleteRequestedEvent.cs │ │ │ ├── ThingySagaExceptionRequestedEvent.cs │ │ │ ├── ThingySagaStartRequestedEvent.cs │ │ │ ├── ThingyUpgradableV1Event.cs │ │ │ ├── ThingyUpgradableV2Event.cs │ │ │ └── ThingyUpgradableV3Event.cs │ │ ├── Queries │ │ │ ├── DbContextQuery.cs │ │ │ ├── DbContextQueryHandler.cs │ │ │ ├── IScopedContext.cs │ │ │ ├── ScopedContext.cs │ │ │ ├── ThingyGetMessagesQuery.cs │ │ │ ├── ThingyGetQuery.cs │ │ │ └── ThingyGetVersionQuery.cs │ │ ├── Sagas │ │ │ ├── Events │ │ │ │ ├── ThingySagaCompletedEvent.cs │ │ │ │ ├── ThingySagaPingReceivedEvent.cs │ │ │ │ └── ThingySagaStartedEvent.cs │ │ │ ├── ThingySaga.cs │ │ │ ├── ThingySagaErrorHandler.cs │ │ │ ├── ThingySagaId.cs │ │ │ └── ThingySagaLocator.cs │ │ ├── Snapshots │ │ │ ├── ThingySnapshot.cs │ │ │ ├── ThingySnapshotV1.cs │ │ │ ├── ThingySnapshotV2.cs │ │ │ ├── ThingySnapshotVersion.cs │ │ │ └── Upgraders │ │ │ │ ├── ThingySnapshotV1ToV2Upgrader.cs │ │ │ │ └── ThingySnapshotV2ToV3Upgrader.cs │ │ ├── Thingy.cs │ │ ├── ThingyAggregate.cs │ │ ├── ThingyId.cs │ │ ├── Upgraders │ │ │ ├── ThingyUpgradableV1ToV2EventUpgrader.cs │ │ │ └── ThingyUpgradableV2ToV3EventUpgrader.cs │ │ └── ValueObjects │ │ │ └── PingId.cs │ ├── Categories.cs │ ├── EventFlow.TestHelpers.csproj │ ├── EventFlowTestHelpers.cs │ ├── Extensions │ │ ├── AggregateStoreExtensions.cs │ │ ├── CommandBusExtensions.cs │ │ ├── EventStoreExtensions.cs │ │ ├── EventStoreMockExtensions.cs │ │ ├── ObjectExtensions.cs │ │ ├── ProcessExtensions.cs │ │ ├── QueryProcessorExtensions.cs │ │ └── ServiceCollectionExtensions.cs │ ├── HttpHelper.cs │ ├── IntegrationTest.cs │ ├── LogHelper.cs │ ├── LoggerMock.cs │ ├── MsSql │ │ ├── IMsSqlDatabase.cs │ │ ├── MsSqlConnectionString.cs │ │ ├── MsSqlDatabase.cs │ │ └── MsSqlHelpz.cs │ ├── ProcessHelper.cs │ ├── Suites │ │ ├── TestSuiteForEventStore.cs │ │ ├── TestSuiteForReadModelStore.cs │ │ ├── TestSuiteForScheduler.cs │ │ └── TestSuiteForSnapshotStore.cs │ ├── TcpHelper.cs │ ├── Test.cs │ ├── TestsFor.cs │ └── WaitHelper.cs ├── EventFlow.Tests │ ├── EventFlow.Tests.csproj │ ├── EventFlowTests.cs │ ├── Exploration │ │ ├── CustomAggregateIdExplorationTest.cs │ │ ├── EventUpgradeExplorationTest.cs │ │ ├── ReadModelRepopulateExplorationTest.cs │ │ └── RegisterSubscribersExplorationTests.cs │ ├── Helpers.cs │ ├── IntegrationTests │ │ ├── Aggregates │ │ │ ├── AggregateFactoryTests.cs │ │ │ └── AggregateStoreTests.cs │ │ ├── BackwardCompatibilityTests.cs │ │ ├── BasicTests.cs │ │ ├── CancellationTests.cs │ │ ├── CommandResultTests.cs │ │ ├── EventStores │ │ │ ├── FilesEventStoreTests.cs │ │ │ └── InMemoryEventStoreTests.cs │ │ ├── Jobs │ │ │ └── InstantJobSchedulerTests.cs │ │ ├── ReadStores │ │ │ ├── InMemoryReadModelStoreTests.cs │ │ │ ├── MultipleAggregateReadStoreManagerTests.cs │ │ │ ├── QueryHandlers │ │ │ │ ├── InMemoryThingyGetMessagesQueryHandler.cs │ │ │ │ ├── InMemoryThingyGetQueryHandler.cs │ │ │ │ └── InMemoryThingyGetVersionQueryHandler.cs │ │ │ └── ReadModels │ │ │ │ ├── InMemoryThingyMessageReadModel.cs │ │ │ │ └── InMemoryThingyReadModel.cs │ │ ├── Sagas │ │ │ ├── AggregateSagaTests.cs │ │ │ ├── AlternativeSagaStoreTestClasses.cs │ │ │ ├── AlternativeSagaStoreTests.cs │ │ │ └── SagaErrorHandlerTests.cs │ │ ├── SeparationTests.cs │ │ ├── ServiceProviderTests.cs │ │ ├── SnapshotStores │ │ │ └── InMemorySnapshotStoreTests.cs │ │ └── UnicodeTests.cs │ ├── LicenseHeaderTests.cs │ ├── ReadMeExamples.cs │ ├── TestData │ │ └── FilesEventStore │ │ │ └── thingy-1acea1eb-3e11-45c0-83c1-bc32e57ee8e7 │ │ │ ├── 1.json │ │ │ └── 2.json │ └── UnitTests │ │ ├── Aggregates │ │ ├── AggregateFactoryTests.cs │ │ ├── AggregateIdTests.cs │ │ ├── AggregateRootApplyEventTests.cs │ │ ├── AggregateRootNameTests.cs │ │ ├── AggregateRootTests.cs │ │ ├── AggregateStateTests.cs │ │ ├── AggregateStoreTests.cs │ │ └── MetadataTests.cs │ │ ├── CommandBusTests.cs │ │ ├── Commands │ │ ├── CommandDefinitionServiceTests.cs │ │ ├── CommandTests.cs │ │ └── DistinctCommandTests.cs │ │ ├── Configuration │ │ ├── EventNamingStrategy │ │ │ ├── NamespaceAndClassNameStrategyTest.cs │ │ │ ├── NamespaceAndNameStrategyTest.cs │ │ │ └── VoidStrategyTest.cs │ │ └── Serialization │ │ │ └── JsonOptionsTests.cs │ │ ├── Core │ │ ├── CircularBufferTests.cs │ │ ├── GuidFactories │ │ │ └── GuidFactoriesDeterministicTests.cs │ │ ├── IdentityTests.cs │ │ ├── LabelTests.cs │ │ ├── ReflectionHelperTests.cs │ │ ├── RetryDelayTests.cs │ │ ├── RetryStrategies │ │ │ └── OptimisticConcurrencyRetryStrategyTests.cs │ │ ├── TransientFaultHandlerTests.cs │ │ └── VersionedTypes │ │ │ └── VersionedTypeDefinitionServiceTestSuite.cs │ │ ├── EventStores │ │ ├── ConcurrentFilesEventPersistanceTests.cs │ │ ├── ConcurrentInMemoryEventPersistanceTests.cs │ │ ├── EventDefinitionServiceTests.cs │ │ ├── EventUpgradeManagerTests.cs │ │ └── Snapshots │ │ │ ├── SnapshotSerializerTests.cs │ │ │ ├── SnapshotSerilizerTests.cs │ │ │ └── SnapshotUpgradeServiceTests.cs │ │ ├── Extensions │ │ ├── JsonSerializerExtensionTests.cs │ │ ├── StringExtensionsTests.cs │ │ └── TypeExtensionsTests.cs │ │ ├── Jobs │ │ └── JobDefinitionServiceTests.cs │ │ ├── Provided │ │ └── Specifications │ │ │ └── AtLeastSpecificationTests.cs │ │ ├── Queries │ │ └── QueryProcessorTests.cs │ │ ├── ReadStores │ │ ├── BaseReadModelTests.cs │ │ ├── MultipleAggregateReadStoreManagerTests.cs │ │ ├── ReadModelDomainEventApplierTests.cs │ │ ├── ReadModelFactoryTests.cs │ │ ├── ReadModelPopulatorTests.cs │ │ ├── ReadStoreManagerTestSuite.cs │ │ ├── SecondTestReadModel.cs │ │ ├── SingleAggregateReadStoreManagerTests.cs │ │ └── TestReadModel.cs │ │ ├── Sagas │ │ ├── AggregateSagas │ │ │ ├── AggregateSagaTests.cs │ │ │ └── SagaAggregateStoreTests.cs │ │ ├── DispatchToSagasTests.cs │ │ └── SagaDefinitionServiceTests.cs │ │ ├── Snapshots │ │ ├── SnapshotAggregateRootTests.cs │ │ ├── SnapshotMetadataTests.cs │ │ ├── SnapshotSerializerTests.cs │ │ ├── SnapshotSerilizerTests.cs │ │ ├── SnapshotUpgradeServiceTests.cs │ │ └── Strategies │ │ │ ├── SnapshotEveryFewVersionsStrategyTests.cs │ │ │ └── SnapshotRandomlyStrategyTests.cs │ │ ├── Specifications │ │ ├── ExpressionSpecificationTests.cs │ │ ├── SpecificationTests.cs │ │ ├── TestSpecifications.cs │ │ └── TestSpecificationsTests.cs │ │ ├── Subscribers │ │ └── DispatchToEventSubscribersTests.cs │ │ └── ValueObjects │ │ ├── SingleValueObjectConverterTests.cs │ │ ├── SingleValueObjectTests.cs │ │ └── ValueObjectTests.cs └── EventFlow │ ├── Aggregates │ ├── AggregateEvent.cs │ ├── AggregateFactory.cs │ ├── AggregateName.cs │ ├── AggregateNameAttribute.cs │ ├── AggregateRoot.cs │ ├── AggregateState.cs │ ├── AggregateStore.cs │ ├── AggregateUpdateResult.cs │ ├── DomainEvent.cs │ ├── EventId.cs │ ├── ExecutionResults │ │ ├── ExecutionResult.cs │ │ ├── FailedExecutionResult.cs │ │ ├── IExecutionResult.cs │ │ └── SuccessExecutionResult.cs │ ├── IAggregateEvent.cs │ ├── IAggregateFactory.cs │ ├── IAggregateName.cs │ ├── IAggregateRoot.cs │ ├── IAggregateStore.cs │ ├── IApply.cs │ ├── IDomainEvent.cs │ ├── IEmit.cs │ ├── IEventApplier.cs │ ├── IEventId.cs │ ├── IMetadata.cs │ ├── Metadata.cs │ └── MetadataKeys.cs │ ├── CommandBus.cs │ ├── Commands │ ├── Command.cs │ ├── CommandDefinition.cs │ ├── CommandDefinitionService.cs │ ├── CommandHandler.cs │ ├── CommandId.cs │ ├── CommandScheduler.cs │ ├── CommandVersionAttribute.cs │ ├── DistinctCommand.cs │ ├── ICommand.cs │ ├── ICommandDefinitionService.cs │ ├── ICommandHandler.cs │ ├── ICommandId.cs │ ├── ICommandScheduler.cs │ ├── ISerializedCommandPublisher.cs │ └── SerializedCommandPublisher.cs │ ├── Configuration │ ├── Cancellation │ │ ├── CancellationBoundary.cs │ │ └── ICancellationConfiguration.cs │ ├── EventFlowConfiguration.cs │ ├── EventNamingStrategy │ │ ├── DefaultStrategy.cs │ │ ├── IEventNamingStrategy.cs │ │ ├── NamespaceAndClassNameStrategy.cs │ │ └── NamespaceAndNameStrategy.cs │ ├── IEventFlowConfiguration.cs │ ├── ILoadedVersionedTypes.cs │ ├── LoadedVersionedTypes.cs │ └── Serialization │ │ ├── ChainedJsonOptions.cs │ │ ├── IJsonOptions.cs │ │ └── JsonOptions.cs │ ├── Core │ ├── AsyncLock.cs │ ├── Caching │ │ └── CacheKey.cs │ ├── CircularBuffer.cs │ ├── DisposableAction.cs │ ├── GuidFactories.cs │ ├── HashHelper.cs │ ├── IIdentity.cs │ ├── IJsonSerializer.cs │ ├── IMetadataContainer.cs │ ├── IRetryStrategy.cs │ ├── ISourceId.cs │ ├── ITransientFaultHandler.cs │ ├── Identity.cs │ ├── JsonSerializer.cs │ ├── Label.cs │ ├── MetadataContainer.cs │ ├── ReflectionHelper.cs │ ├── Retry.cs │ ├── RetryDelay.cs │ ├── RetryStrategies │ │ ├── IOptimisticConcurrencyRetryStrategy.cs │ │ └── OptimisticConcurrencyRetryStrategy.cs │ ├── SourceId.cs │ ├── TransientFaultHandler.cs │ └── VersionedTypes │ │ ├── IVersionedType.cs │ │ ├── IVersionedTypeDefinitionService.cs │ │ ├── IVersionedTypeUpgradeService.cs │ │ ├── IVersionedTypeUpgrader.cs │ │ ├── VersionedTypeAttribute.cs │ │ ├── VersionedTypeDefinition.cs │ │ ├── VersionedTypeDefinitionService.cs │ │ └── VersionedTypeUpgradeService.cs │ ├── Entities │ ├── Entity.cs │ └── IEntity.cs │ ├── EventFlow.csproj │ ├── EventFlowOptions.cs │ ├── EventStores │ ├── AllCommittedEventsPage.cs │ ├── AllEventsPage.cs │ ├── DomainEventFactory.cs │ ├── EventDefinition.cs │ ├── EventDefinitionService.cs │ ├── EventJsonSerializer.cs │ ├── EventStoreBase.cs │ ├── EventUpgradeContext.cs │ ├── EventUpgradeContextFactory.cs │ ├── EventUpgradeManager.cs │ ├── EventUpgrader.cs │ ├── EventVersionAttribute.cs │ ├── Files │ │ ├── FilesEventLocator.cs │ │ ├── FilesEventPersistence.cs │ │ ├── FilesEventStoreConfiguration.cs │ │ ├── IFilesEventLocator.cs │ │ └── IFilesEventStoreConfiguration.cs │ ├── GlobalPosition.cs │ ├── IAggregateStoreResilienceStrategy.cs │ ├── ICommittedDomainEvent.cs │ ├── IDomainEventFactory.cs │ ├── IEventDefinitionService.cs │ ├── IEventJsonSerializer.cs │ ├── IEventPersistence.cs │ ├── IEventStore.cs │ ├── IEventUpgradeContext.cs │ ├── IEventUpgradeContextFactory.cs │ ├── IEventUpgradeManager.cs │ ├── IEventUpgrader.cs │ ├── IMetadataProvider.cs │ ├── ISerializedEvent.cs │ ├── IUncommittedEvent.cs │ ├── InMemory │ │ └── InMemoryEventPersistence.cs │ ├── NoAggregateStoreResilienceStrategy.cs │ ├── SerializedEvent.cs │ └── UncommittedEvent.cs │ ├── Exceptions │ ├── CommandException.cs │ ├── DomainError.cs │ ├── DuplicateOperationException.cs │ ├── MetadataKeyNotFoundException.cs │ ├── MetadataParseException.cs │ ├── NoCommandHandlersException.cs │ ├── OptimisticConcurrencyException.cs │ ├── SagaPublishException.cs │ └── UnknownJobException.cs │ ├── Extensions │ ├── DateTimeOffsetExtensions.cs │ ├── DictionaryExtensions.cs │ ├── DisposableExtensions.cs │ ├── EventFlowOptionsAggregatesExtensions.cs │ ├── EventFlowOptionsCommandExtensions.cs │ ├── EventFlowOptionsCommandHandlerExtensions.cs │ ├── EventFlowOptionsDefaultExtensions.cs │ ├── EventFlowOptionsEventStoresExtensions.cs │ ├── EventFlowOptionsEventUpgradersExtensions.cs │ ├── EventFlowOptionsEventsExtensions.cs │ ├── EventFlowOptionsExtensions.cs │ ├── EventFlowOptionsJobExtensions.cs │ ├── EventFlowOptionsJsonConfigurationExtensions.cs │ ├── EventFlowOptionsMetadataProvidersExtensions.cs │ ├── EventFlowOptionsQueriesExtensions.cs │ ├── EventFlowOptionsReadStoresExtensions.cs │ ├── EventFlowOptionsSagasExtensions.cs │ ├── EventFlowOptionsSnapshotExtensions.cs │ ├── EventFlowOptionsSubscriberExtensions.cs │ ├── IdentityExtensions.cs │ ├── JsonOptionsExtensions.cs │ ├── ReadModelEnvelopeExtensions.cs │ ├── ServiceCollectionExtensions.cs │ ├── SourceIdExtensions.cs │ ├── SpecificationExtensions.cs │ ├── StringBuilderExtensions.cs │ ├── StringExtensions.cs │ └── TypeExtensions.cs │ ├── ICommandBus.cs │ ├── IEventFlowOptions.cs │ ├── Jobs │ ├── IJob.cs │ ├── IJobDefinitionService.cs │ ├── IJobId.cs │ ├── IJobRunner.cs │ ├── IJobScheduler.cs │ ├── InstantJobScheduler.cs │ ├── JobDefinition.cs │ ├── JobDefinitionService.cs │ ├── JobId.cs │ ├── JobRunner.cs │ └── JobVersionAttribute.cs │ ├── MetadataProviders │ ├── AddEventTypeMetadataProvider.cs │ ├── AddGuidMetadataProvider.cs │ └── AddMachineNameMetadataProvider.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Provided │ ├── Jobs │ │ ├── DispatchToAsynchronousEventSubscribers.cs │ │ └── PublishCommandJob.cs │ └── Specifications │ │ ├── AggregateIsNewSpecification.cs │ │ ├── AllSpecification.cs │ │ ├── AndSpeficication.cs │ │ ├── AtLeastSpecification.cs │ │ ├── ExpressionSpecification.cs │ │ ├── NotSpecification.cs │ │ └── OrSpecification.cs │ ├── Queries │ ├── IQuery.cs │ ├── IQueryHandler.cs │ ├── IQueryProcessor.cs │ ├── QueryProcessor.cs │ └── ReadModelByIdQuery.cs │ ├── ReadStores │ ├── DispatchToReadStores.cs │ ├── IAmReadModelFor.cs │ ├── IDispatchToReadStores.cs │ ├── IDispatchToReadStoresResilienceStrategy.cs │ ├── IReadModel.cs │ ├── IReadModelContext.cs │ ├── IReadModelContextFactory.cs │ ├── IReadModelDomainEventApplier.cs │ ├── IReadModelFactory.cs │ ├── IReadModelLocator.cs │ ├── IReadModelPopulator.cs │ ├── IReadModelStore.cs │ ├── IReadStoreManager.cs │ ├── InMemory │ │ ├── IInMemoryReadStore.cs │ │ ├── InMemoryQueryHandler.cs │ │ ├── InMemoryReadStore.cs │ │ └── Queries │ │ │ └── InMemoryQuery.cs │ ├── MultipleAggregateReadStoreManager.cs │ ├── NoDispatchToReadStoresResilienceStrategy.cs │ ├── ReadModelContext.cs │ ├── ReadModelContextFactory.cs │ ├── ReadModelDomainEventApplier.cs │ ├── ReadModelEnvelope.cs │ ├── ReadModelFactory.cs │ ├── ReadModelPopulator.cs │ ├── ReadModelStore.cs │ ├── ReadModelUpdate.cs │ ├── ReadModelUpdateResult.cs │ ├── ReadStoreManager.cs │ └── SingleAggregateReadStoreManager.cs │ ├── Sagas │ ├── AggregateSagas │ │ ├── AggregateSaga.cs │ │ ├── IAggregateSaga.cs │ │ └── SagaAggregateStore.cs │ ├── DispatchToSagas.cs │ ├── IDispatchToSagas.cs │ ├── ISaga.cs │ ├── ISagaContext.cs │ ├── ISagaDefinitionService.cs │ ├── ISagaErrorHandler.cs │ ├── ISagaHandles.cs │ ├── ISagaId.cs │ ├── ISagaIsStartedBy.cs │ ├── ISagaLocator.cs │ ├── ISagaStore.cs │ ├── ISagaUpdateResilienceStrategy.cs │ ├── ISagaUpdater.cs │ ├── NoSagaUpdateResilienceStrategy.cs │ ├── SagaContext.cs │ ├── SagaDefinitionService.cs │ ├── SagaDetails.cs │ ├── SagaErrorHandler.cs │ ├── SagaState.cs │ ├── SagaStore.cs │ └── SagaUpdater.cs │ ├── Snapshots │ ├── CommittedSnapshot.cs │ ├── ISnapshot.cs │ ├── ISnapshotAggregateRoot.cs │ ├── ISnapshotDefinitionService.cs │ ├── ISnapshotMetadata.cs │ ├── ISnapshotSerializer.cs │ ├── ISnapshotSerilizer.cs │ ├── ISnapshotStore.cs │ ├── ISnapshotUpgradeService.cs │ ├── ISnapshotUpgrader.cs │ ├── SerializedSnapshot.cs │ ├── SnapshotAggregateRoot.cs │ ├── SnapshotContainer.cs │ ├── SnapshotDefinition.cs │ ├── SnapshotDefinitionService.cs │ ├── SnapshotMetadata.cs │ ├── SnapshotMetadataKeys.cs │ ├── SnapshotSerializer.cs │ ├── SnapshotSerilizer.cs │ ├── SnapshotStore.cs │ ├── SnapshotUpgradeService.cs │ ├── SnapshotVersionAttribute.cs │ ├── Stores │ │ ├── ISnapshotPersistence.cs │ │ ├── InMemory │ │ │ └── InMemorySnapshotPersistence.cs │ │ └── Null │ │ │ └── NullSnapshotPersistence.cs │ └── Strategies │ │ ├── ISnapshotStrategy.cs │ │ ├── SnapshotEveryFewVersionsStrategy.cs │ │ └── SnapshotRandomlyStrategy.cs │ ├── Specifications │ ├── ISpecification.cs │ └── Specification.cs │ ├── Subscribers │ ├── DispatchToEventSubscribers.cs │ ├── DomainEventPublisher.cs │ ├── IDispatchToEventSubscribers.cs │ ├── IDispatchToSubscriberResilienceStrategy.cs │ ├── IDomainEventPublisher.cs │ ├── ISubscribe.cs │ ├── ISubscribeAsynchronousTo.cs │ ├── ISubscribeSynchronousTo.cs │ ├── ISubscribeSynchronousToAll.cs │ └── NoDispatchToSubscriberResilienceStrategy.cs │ └── ValueObjects │ ├── ISingleValueObject.cs │ ├── SingleValueObject.cs │ ├── SingleValueObjectConverter.cs │ └── ValueObject.cs ├── docker-compose.yml ├── icon-128.png ├── icon-256.png ├── mkdocs.yml └── requirements.txt /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EventFlow Framework", 3 | "service": "event-flow-framework", 4 | "dockerComposeFile": ["./docker-compose.yml"], 5 | "settings": {}, 6 | "extensions": [ 7 | "ms-dotnettools.csharp", 8 | "streetsidesoftware.code-spell-checker", 9 | "k--kato.docomment", 10 | "editorconfig.editorconfig", 11 | "heaths.vscode-guid", 12 | "jchannon.csharpextensions", 13 | "aaron-bond.better-comments", 14 | "kiteco.kite", 15 | "esbenp.prettier-vscode" 16 | ], 17 | "workspaceFolder": "/workspace", 18 | "remoteUser": "vscode", 19 | "shutdownAction": "none" 20 | } 21 | -------------------------------------------------------------------------------- /.devcontainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | networks: 3 | development: 4 | external: true 5 | services: 6 | event-flow-framework: 7 | container_name: event-flow-framework 8 | ports: 9 | - 6000:6000 10 | volumes: 11 | - ../:/workspace:cached 12 | build: 13 | context: ../ 14 | dockerfile: ./.devcontainer/dockerfile 15 | command: /bin/sh -c "while sleep 1000; do :; done" 16 | networks: 17 | - development 18 | -------------------------------------------------------------------------------- /.devcontainer/dockerfile: -------------------------------------------------------------------------------- 1 | ARG VARIANT="6.0" 2 | FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT} 3 | 4 | ARG NODE_VERSION="none" 5 | RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [rasmus] 2 | custom: ["https://www.paypal.me/rasmusnu"] 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | -------------------------------------------------------------------------------- /.github/workflows/docs.yaml: -------------------------------------------------------------------------------- 1 | name: docs 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop-v1 7 | 8 | jobs: 9 | deploy: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | steps: 14 | - uses: actions/checkout@v3 15 | - uses: actions/setup-python@v5 16 | with: 17 | python-version: 3.x 18 | 19 | - run: pip install -r requirements.txt 20 | 21 | - run: mkdocs gh-deploy --force 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }} 25 | -------------------------------------------------------------------------------- /.github/workflows/pull-requests.yaml: -------------------------------------------------------------------------------- 1 | name: pull-requests 2 | 3 | on: 4 | push: 5 | branches: [ develop-v1 ] 6 | pull_request: 7 | branches: [ develop-v1 ] 8 | 9 | permissions: 10 | contents: read 11 | 12 | jobs: 13 | pipeline: 14 | uses: ./.github/workflows/pipeline.yaml 15 | with: 16 | version: "1.2.2-pr${{ github.event.number }}-b${{ github.run_number }}" 17 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | branches: [ release-v1 ] 6 | 7 | permissions: 8 | contents: write 9 | packages: write 10 | 11 | jobs: 12 | pipeline: 13 | uses: ./.github/workflows/pipeline.yaml 14 | with: 15 | bake-convention: 'Release' 16 | environment: 'release' 17 | version: "1.2.2" 18 | secrets: 19 | nuget-api-key: ${{ secrets.NUGET_APIKEY }} 20 | -------------------------------------------------------------------------------- /.github/workflows/test-reports.yaml: -------------------------------------------------------------------------------- 1 | name: test reports 2 | 3 | on: 4 | workflow_run: 5 | workflows: 6 | - 'pull-requests' 7 | - 'release' 8 | types: 9 | - completed 10 | 11 | jobs: 12 | report: 13 | runs-on: ubuntu-latest 14 | permissions: 15 | id-token: write 16 | contents: read 17 | checks: write 18 | steps: 19 | - uses: dorny/test-reporter@v1 20 | with: 21 | artifact: test-results 22 | name: Test results 23 | path: '**/*.trx' 24 | reporter: dotnet-trx 25 | -------------------------------------------------------------------------------- /Documentation/CNAME: -------------------------------------------------------------------------------- 1 | geteventflow.net 2 | -------------------------------------------------------------------------------- /Documentation/additional/configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Configuration 3 | --- 4 | 5 | # Configuration 6 | 7 | EventFlow configuration can be done via the `.Configure(o => {})` method, which is available on the `EventFlowOptions` object. 8 | 9 | ```csharp 10 | using var serviceCollection = new ServiceCollection() 11 | // ... 12 | .AddEventFlow(e => e.Configure(o => 13 | { 14 | o.IsAsynchronousSubscribersEnabled = true; 15 | o.ThrowSubscriberExceptions = true; 16 | })) 17 | // ... 18 | .BuildServiceProvider(); 19 | ``` 20 | 21 | In this example, we enable asynchronous subscribers and configure EventFlow to throw exceptions for subscriber errors. You can customize the configuration options to suit your needs. 22 | -------------------------------------------------------------------------------- /Documentation/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eventflow/EventFlow/7c91526eaefd63887cb34072b81cfec50d63d598/Documentation/assets/logo.png -------------------------------------------------------------------------------- /Documentation/images/logo-with-contour.svg: -------------------------------------------------------------------------------- 1 | Contour -------------------------------------------------------------------------------- /Documentation/index.md: -------------------------------------------------------------------------------- 1 | Welcome! 2 | ======== 3 | 4 | EventFlow logo 5 | 6 | EventFlow is a basic CQRS+ES framework designed to be easy to use. 7 | 8 | Have a look at our [getting started guide](getting-started.md), the [do’s and don’ts](./additional/dos-and-donts.md), and the [FAQ](./additional/faq.md). 9 | 10 | - :fontawesome-brands-github: The source code is available on [GitHub](https://github.com/eventflow/EventFlow) and provided under the MIT license. 11 | - :fontawesome-brands-discord: To engage with the community, please join our [Discord server](https://discord.gg/QfgNPs5WxR). 12 | 13 | ### Features 14 | 15 | * **Easy to use:** Designed with sensible defaults and implementations that make it easy to create an example application 16 | * **Highly configurable and extendable:** EventFlow uses interfaces for every part of its core, making it easy to replace or extend existing features with custom implementations. 17 | * **No use of threads or background workers** 18 | * **MIT licensed:** Easy to understand and use license for enterprise 19 | 20 | !!! example 21 | 22 | **Documentation is still in progress for v1** 23 | 24 | If you have any suggestions for the documentation, even if it's just a typo, please create an issue or a pull request. Improvements to the documentation are always welcome. 25 | 26 | Useful links for updating the documentation: 27 | 28 | - [https://squidfunk.github.io/mkdocs-material/reference/](https://squidfunk.github.io/mkdocs-material/reference/) 29 | -------------------------------------------------------------------------------- /Documentation/integration/mongodb.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: MongoDB 4 | parent: Integration 5 | nav_order: 2 6 | --- 7 | 8 | Mongo DB 9 | ======== 10 | 11 | To setup EventFlow Mongo DB, install the NuGet package `EventFlow.MongoDB` and add this to your EventFlow setup. 12 | 13 | ```csharp 14 | // ... 15 | .ConfigureMongoDb(client, "database-name") 16 | // ... 17 | ``` 18 | 19 | After setting up Mongo DB support in EventFlow, you can continue to configure it. 20 | 21 | - [Event store](event-stores.md#mongo-db) 22 | - [Read model store](read-stores.md#mongo-db) 23 | -------------------------------------------------------------------------------- /Documentation/integration/mssql.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Microsoft SQL Server 4 | parent: Integration 5 | nav_order: 2 6 | --- 7 | 8 | Microsoft SQL Server 9 | ==================== 10 | 11 | To setup EventFlow Microsoft SQL Server integration, install the NuGet 12 | package `EventFlow.MsSql` and add this to your EventFlow setup. 13 | 14 | ```csharp 15 | public void ConfigureServices(IServiceCollection services) 16 | { 17 | services.AddEventFlow(ef => 18 | { 19 | ef.ConfigureMsSql(MsSqlConfiguration.New 20 | .SetConnectionString(@"Server=.\SQLEXPRESS;Database=MyApp;User Id=sa;Password=???")) 21 | .UseMssqlEventStore(); 22 | }); 23 | } 24 | ``` 25 | 26 | After setting up Microsoft SQL Server support in EventFlow, you can 27 | continue to configure it. 28 | 29 | - [Event store](event-stores.md#mongo-db) 30 | - [Read model store](read-stores.md#mongo-db) 31 | -------------------------------------------------------------------------------- /Documentation/integration/postgresql.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: PostgreSQL 4 | parent: Integration 5 | nav_order: 2 6 | --- 7 | 8 | ## PostgreSQL 9 | 10 | To setup EventFlow PostgreSQL integration, install the NuGet 11 | package [EventFlow.PostgreSql](https://www.nuget.org/packages/EventFlow.PostgreSql) and add this to your EventFlow setup. 12 | 13 | ```csharp 14 | // ... 15 | .ConfigurePostgreSql(PostgreSqlConfiguration.New 16 | .SetConnectionString(@"User ID=me;Password=???;Host=localhost;Port=5432;Database=MyApp")) 17 | .UsePostgreSqlEventStore() 18 | .UsePostgreSqlSnapshotStore() 19 | .UsePostgreSqlReadModel() 20 | .UsePostgreSqlReadModel() 21 | // ... 22 | ``` 23 | 24 | This code block configures EventFlow to store events, snapshots and read models in PostgreSQL. It's not mandatory, you 25 | can mix and match, i.e. storing events in PostgreSQL, read models in Elastic search and don't using snapshots at all. 26 | 27 | - Event store. One big table `EventFlow` for all events for all aggregates. 28 | - Read model store. Table `ReadModel-[ClassName]` per read model type. 29 | - Snapshot store. One big table `EventFlowSnapshots` for all aggregates. 30 | -------------------------------------------------------------------------------- /Documentation/integration/rabbitmq.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: RabbitMQ 4 | parent: Integration 5 | nav_order: 2 6 | --- 7 | 8 | RabbitMQ 9 | ======== 10 | 11 | To setup EventFlow's [RabbitMQ](https://www.rabbitmq.com/) integration, install the NuGet package 12 | `EventFlow.RabbitMQ` and add this to your EventFlow setup. 13 | 14 | ```csharp 15 | var uri = new Uri("amqp://localhost"); 16 | // ... 17 | .PublishToRabbitMq(RabbitMqConfiguration.With(uri)) 18 | // ... 19 | ``` 20 | 21 | After setting up RabbitMQ support in EventFlow, you can continue to configure it. 22 | 23 | - [Publish all domain events](../basics/subscribers.md) 24 | -------------------------------------------------------------------------------- /Documentation/integration/redis.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Redis 4 | parent: Integration 5 | nav_order: 3 6 | --- 7 | 8 | Redis 9 | ======== 10 | 11 | ### Persistence 12 | In order to use Redis as a primary database for events and read models, some sort of persistence option should be used. 13 | Redis provides several configurable [options](https://redis.io/docs/manual/persistence/). 14 | 15 | ### Version and modules 16 | In order to use Redis as an event store, Redis version 5 is required in order to use streams. 17 | The read and snapshot store require the Redis Search and JSON modules, which are included in [Redis Stack](https://redis.io/docs/stack/). 18 | 19 | ### Setup 20 | To setup Redis together with EventFlow, install the NuGet package `EventFlow.Redis` and add `.ConfigureRedis(connectionString)` or `.ConfigureRedis(IConnectionMultiplexer)` to your `EventFlowOptions` configuration. 21 | 22 | After the setup, you can configure Redis as your _EventStore_, _ReadStore_ and _SnapshotStore_. 23 | 24 | - [Event store](event-stores.md#redis) 25 | - [Read model store](read-stores.md#redis) 26 | -------------------------------------------------------------------------------- /EventFlow.sln.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | True 3 | True 4 | True 5 | True 6 | True 7 | True 8 | True 9 | True -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | https://github.com/eventflow/EventFlow 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /Resources/jetbrains-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eventflow/EventFlow/7c91526eaefd63887cb34072b81cfec50d63d598/Resources/jetbrains-128x128.png -------------------------------------------------------------------------------- /Resources/with-contour-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eventflow/EventFlow/7c91526eaefd63887cb34072b81cfec50d63d598/Resources/with-contour-256x256.png -------------------------------------------------------------------------------- /Resources/with-contour.svg: -------------------------------------------------------------------------------- 1 | Contour -------------------------------------------------------------------------------- /Resources/without-contour-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eventflow/EventFlow/7c91526eaefd63887cb34072b81cfec50d63d598/Resources/without-contour-256x256.png -------------------------------------------------------------------------------- /Resources/without-contour.svg: -------------------------------------------------------------------------------- 1 | NoContour -------------------------------------------------------------------------------- /Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | False 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EventFlow.AspNetCore/EventFlowAspNetCore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Reflection; 24 | 25 | namespace EventFlow.AspNetCore 26 | { 27 | public class EventFlowAspNetCore 28 | { 29 | public static Assembly Assembly { get; } = typeof(EventFlowAspNetCore).GetTypeInfo().Assembly; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Source/EventFlow.AspNetCore/MetadataProviders/IUserClaimsMetadataOptions.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.AspNetCore.MetadataProviders 24 | { 25 | public interface IUserClaimsMetadataOptions 26 | { 27 | bool IsIncluded(string claimType); 28 | string GetKeyForClaimType(string claimType); 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.CodeStyle.Tests/EventFlow.CodeStyle.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | true 6 | true 7 | 8 | 9 | 10 | https://dotnet.myget.org/F/roslyn-analyzers/api/v3/index.json;$(RestoreAdditionalProjectSources) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/EventFlow.CodeStyle/EventFlow.CodeStyle.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | false 6 | true 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | True 6 | False 7 | False 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Source/EventFlow.Elasticsearch.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.Elasticsearch/ReadStores/IElasticsearchReadModelStore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ReadStores; 24 | 25 | namespace EventFlow.Elasticsearch.ReadStores 26 | { 27 | public interface IElasticsearchReadModelStore : IReadModelStore 28 | where TReadModel : class, IReadModel 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net8.0 5 | False 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework.Tests/MsSql/IncludeTests/AddressId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.EntityFramework.Tests.MsSql.IncludeTests 26 | { 27 | public class AddressId : Identity 28 | { 29 | public AddressId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework.Tests/MsSql/IncludeTests/PersonId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.EntityFramework.Tests.MsSql.IncludeTests 26 | { 27 | public class PersonId : Identity 28 | { 29 | public PersonId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net8.0 4 | True 5 | EventFlow.EntityFramework 6 | Frank Ebersoll 7 | Rasmus Mikkelsen 8 | Copyright (c) Rasmus Mikkelsen 2015 - 2025 9 | Entity Framework Core support for EventFlow 10 | CQRS ES event sourcing EF Entity Framework Core 11 | git 12 | https://github.com/eventflow/EventFlow 13 | https://docs.geteventflow.net/ 14 | MIT 15 | en-US 16 | UPDATED BY BUILD 17 | enable 18 | true 19 | 20 | 21 | 22 | 23 | 24 | 8.0.11 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework/IBulkOperationConfiguration.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.EntityFramework 24 | { 25 | public interface IBulkOperationConfiguration 26 | { 27 | int DeletionBatchSize { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework/IDbContextProvider.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using Microsoft.EntityFrameworkCore; 24 | 25 | namespace EventFlow.EntityFramework 26 | { 27 | public interface IDbContextProvider where TDbContext : DbContext 28 | { 29 | TDbContext CreateContext(); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework/IEntityFrameworkConfiguration.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using Microsoft.Extensions.DependencyInjection; 24 | 25 | namespace EventFlow.EntityFramework 26 | { 27 | public interface IEntityFrameworkConfiguration 28 | { 29 | void Apply(IServiceCollection serviceCollection); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework/IUniqueConstraintDetectionStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using Microsoft.EntityFrameworkCore; 24 | 25 | namespace EventFlow.EntityFramework 26 | { 27 | public interface IUniqueConstraintDetectionStrategy 28 | { 29 | bool IsUniqueConstraintViolation(DbUpdateException exception); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.EntityFramework/ReadStores/IEntityFrameworkReadModelStore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ReadStores; 24 | 25 | namespace EventFlow.EntityFramework.ReadStores 26 | { 27 | public interface IEntityFrameworkReadModelStore : IReadModelStore 28 | where T : class, IReadModel 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.EventStores.EventStore.Tests/EventFlow.EventStores.EventStore.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | True 6 | False 7 | False 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Source/EventFlow.EventStores.EventStore.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net6.0 4 | False 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Source/EventFlow.Examples.Shipping.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.Examples.Shipping/Domain/Model/VoyageModel/Queries/GetAllVoyagesQuery.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Collections.Generic; 24 | using EventFlow.Queries; 25 | 26 | namespace EventFlow.Examples.Shipping.Domain.Model.VoyageModel.Queries 27 | { 28 | public class GetAllVoyagesQuery : IQuery> 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/EventFlow.Hangfire.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.1;netcoreapp3.1;net6.0;net8.0 4 | EventFlow.Hangfire 5 | EventFlow.Hangfire 6 | Rasmus Mikkelsen 7 | Rasmus Mikkelsen 8 | Hangfire job scheduling support for EventFlow 9 | CQRS ES event sourcing Hangfire 10 | UPDATED BY BUILD 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/EventFlow.Hangfire/Integration/IEventFlowHangfireOptions.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Hangfire.Integration 24 | { 25 | public interface IEventFlowHangfireOptions 26 | { 27 | IEventFlowHangfireOptions UseQueueName(string queueName); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/EventFlow.Hangfire/Integration/IQueueNameProvider.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Hangfire.Integration 24 | { 25 | public interface IQueueNameProvider 26 | { 27 | string QueueName { get; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/EventFlow.MongoDB.Tests/EventFlow.MongoDB.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EventFlow.MongoDB.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netstandard2.1;netcoreapp3.1;net6.0;net8.0 4 | EventFlow.MongoDB 5 | EventFlow.MongoDB 6 | Jan Feyen, Warren Pieterse 7 | MongoDB ReadStore and Snapshot Persistence for EventFlow 8 | CQRS ES event sourcing MongoDB 9 | UPDATED BY BUILD 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Source/EventFlow.MongoDB/EventStore/IMongoDbEventPersistenceInitializer.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.MongoDB.EventStore 24 | { 25 | public interface IMongoDbEventPersistenceInitializer 26 | { 27 | void Initialize(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/EventFlow.MongoDB/EventStore/IMongoDbEventSequenceStore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.MongoDB.EventStore 24 | { 25 | public interface IMongoDbEventSequenceStore 26 | { 27 | long GetNextSequence(string name); 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow.MongoDB/ReadStores/IMongoDbReadModel.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ReadStores; 24 | 25 | namespace EventFlow.MongoDB.ReadStores 26 | { 27 | public interface IMongoDbReadModel : IReadModel 28 | { 29 | string Id { get; } 30 | long? Version { get; set; } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/EventFlow.MsSql.Tests/IntegrationTests/ReadStores/Scripts/0001 - Create table ReadModel-ThingyAggregate.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[ReadModel-ThingyAggregate]( 2 | [PingsReceived] [int] NOT NULL, 3 | [DomainErrorAfterFirstReceived] [bit] NOT NULL, 4 | 5 | -- ------------------------------------------------- 6 | [Id] [bigint] IDENTITY(1,1) NOT NULL, 7 | [AggregateId] [nvarchar](64) NOT NULL, 8 | [CreateTime] [datetimeoffset](7) NOT NULL, 9 | [UpdatedTime] [datetimeoffset](7) NOT NULL, 10 | [LastAggregateSequenceNumber] [int] NOT NULL, 11 | CONSTRAINT [PK_ReadModel-ThingyAggregate] PRIMARY KEY CLUSTERED 12 | ( 13 | [Id] ASC 14 | ) 15 | ) 16 | 17 | CREATE UNIQUE NONCLUSTERED INDEX [IX_ReadModel-ThingyAggregate_AggregateId] ON [dbo].[ReadModel-ThingyAggregate] 18 | ( 19 | [AggregateId] ASC 20 | ) 21 | -------------------------------------------------------------------------------- /Source/EventFlow.MsSql.Tests/IntegrationTests/ReadStores/Scripts/0002 - Create table ReadModel-ThingyMessage.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE [dbo].[ReadModel-ThingyMessage]( 2 | [Id] [bigint] IDENTITY(1,1) NOT NULL, 3 | [ThingyId] [nvarchar](64) NOT NULL, 4 | [MessageId] [nvarchar](64) NOT NULL, 5 | [Message] [nvarchar](MAX) NOT NULL, 6 | CONSTRAINT [PK_ReadModel-ThingyMessage] PRIMARY KEY CLUSTERED 7 | ( 8 | [Id] ASC 9 | ) 10 | ) 11 | 12 | CREATE UNIQUE NONCLUSTERED INDEX [IX_ReadModel-ThingyMessage_AggregateId] ON [dbo].[ReadModel-ThingyMessage] 13 | ( 14 | [MessageId] ASC 15 | ) 16 | 17 | CREATE NONCLUSTERED INDEX [IX_ReadModel-ThingyMessage_ThingyId] ON [dbo].[ReadModel-ThingyMessage] 18 | ( 19 | [ThingyId] ASC 20 | ) 21 | -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/Connections/IMsSqlConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.MsSql.Connections 26 | { 27 | public interface IMsSqlConnectionFactory : ISqlConnectionFactory 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/EventFlow.MsSql.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.1;netcoreapp3.1;net6.0 4 | EventFlow.MsSql 5 | Rasmus Mikkelsen 6 | Rasmus Mikkelsen 7 | Copyright (c) Rasmus Mikkelsen 2015 - 2021 8 | MSSQL support for EventFlow 9 | CQRS ES event sourcing MSSQL 10 | UPDATED BY BUILD 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/EventStores/Scripts/0001 - Create table EventFlow.sql: -------------------------------------------------------------------------------- 1 | IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = N'dbo' AND table_name = N'EventFlow') 2 | BEGIN 3 | CREATE TABLE [dbo].[EventFlow]( 4 | [GlobalSequenceNumber] [bigint] IDENTITY(1,1) NOT NULL, 5 | [BatchId] [uniqueidentifier] NOT NULL, 6 | [AggregateId] [nvarchar](255) NOT NULL, 7 | [AggregateName] [nvarchar](255) NOT NULL, 8 | [Data] [nvarchar](max) NOT NULL, 9 | [Metadata] [nvarchar](max) NOT NULL, 10 | [AggregateSequenceNumber] [int] NOT NULL, 11 | CONSTRAINT [PK_EventFlow] PRIMARY KEY CLUSTERED 12 | ( 13 | [GlobalSequenceNumber] ASC 14 | ) 15 | ) 16 | 17 | CREATE UNIQUE NONCLUSTERED INDEX [IX_EventFlow_AggregateId_AggregateSequenceNumber] ON [dbo].[EventFlow] 18 | ( 19 | [AggregateId] ASC, 20 | [AggregateSequenceNumber] ASC 21 | ) 22 | END -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/EventStores/Scripts/0002 - Create eventdatamodel_list_type.sql: -------------------------------------------------------------------------------- 1 | IF NOT EXISTS (SELECT * FROM SYS.TYPES WHERE is_table_type = 1 AND name = 'eventdatamodel_list_type') 2 | BEGIN 3 | CREATE TYPE dbo.eventdatamodel_list_type AS TABLE 4 | ( 5 | [AggregateId] [nvarchar](255) NOT NULL, 6 | [AggregateName] [nvarchar](255) NOT NULL, 7 | [AggregateSequenceNumber] [int] NOT NULL, 8 | [BatchId] [uniqueidentifier] NOT NULL, 9 | [Data] [nvarchar](max) NOT NULL, 10 | [Metadata] [nvarchar](max) NOT NULL 11 | ) 12 | END 13 | -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/IMsSqlConnection.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.MsSql 26 | { 27 | public interface IMsSqlConnection : ISqlConnection 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/IMsSqlDatabaseMigrator.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Migrations; 24 | 25 | namespace EventFlow.MsSql 26 | { 27 | public interface IMsSqlDatabaseMigrator : ISqlDatabaseMigrator 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/ReadStores/IMssqlReadModelStore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ReadStores; 24 | 25 | namespace EventFlow.MsSql.ReadStores 26 | { 27 | public interface IMssqlReadModelStore : IReadModelStore 28 | where TReadModel : class, IReadModel 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/RetryStrategies/IMsSqlErrorRetryStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.MsSql.RetryStrategies 26 | { 27 | public interface IMsSqlErrorRetryStrategy : IRetryStrategy 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.MsSql/SnapshotStores/Scripts/0001 - Create EventFlowSnapshots.sql: -------------------------------------------------------------------------------- 1 | IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = N'dbo' AND table_name = N'EventFlowSnapshots') 2 | BEGIN 3 | CREATE TABLE [dbo].[EventFlowSnapshots]( 4 | [Id] [bigint] IDENTITY(1,1) NOT NULL, 5 | [AggregateId] [nvarchar](128) NOT NULL, 6 | [AggregateName] [nvarchar](128) NOT NULL, 7 | [AggregateSequenceNumber] [int] NOT NULL, 8 | [Data] [nvarchar](MAX) NOT NULL, 9 | [Metadata] [nvarchar](MAX) NOT NULL, 10 | CONSTRAINT [PK_EventFlowSnapshots] PRIMARY KEY CLUSTERED 11 | ( 12 | [Id] ASC 13 | ) 14 | ) 15 | 16 | CREATE UNIQUE NONCLUSTERED INDEX [IX_EventFlowSnapshots_AggregateId_AggregateSequenceNumber] ON [dbo].[EventFlowSnapshots] 17 | ( 18 | [AggregateName] ASC, 19 | [AggregateId] ASC, 20 | [AggregateSequenceNumber] ASC 21 | ) 22 | END 23 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql.Tests/IntegrationTests/ReadStores/Scripts/0001 - Create table ReadModel-ThingyAggregate.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS "ReadModel-ThingyAggregate"( 2 | PingsReceived int NOT NULL, 3 | DomainErrorAfterFirstReceived Boolean NOT NULL, 4 | 5 | -- ------------------------------------------------- 6 | Id bigint GENERATED BY DEFAULT AS IDENTITY, 7 | AggregateId Varchar(64) NOT NULL, 8 | CreateTime Timestamp WITH TIME ZONE NOT NULL, 9 | UpdatedTime Timestamp WITH TIME ZONE NOT NULL, 10 | LastAggregateSequenceNumber int NOT NULL, 11 | CONSTRAINT "PK_ReadModel-ThingyAggregate" PRIMARY KEY 12 | ( 13 | Id 14 | ) 15 | ); 16 | 17 | CREATE INDEX IF NOT EXISTS "IX_ReadModel-ThingyAggregate_AggregateId" ON "ReadModel-ThingyAggregate" 18 | ( 19 | AggregateId 20 | ); -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql.Tests/IntegrationTests/ReadStores/Scripts/0002 - Create table ReadModel-ThingyMessage.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS "ReadModel-ThingyMessage"( 2 | Id bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL, 3 | ThingyId varchar(64) NOT NULL, 4 | MessageId varchar(64) NOT NULL, 5 | Message text NOT NULL, 6 | CONSTRAINT "PK_ReadModel-ThingyMessage" PRIMARY KEY 7 | ( 8 | Id 9 | ) 10 | ); 11 | 12 | CREATE INDEX IF NOT EXISTS "IX_ReadModel-ThingyMessage_AggregateId" ON "ReadModel-ThingyMessage" 13 | ( 14 | MessageId 15 | ); 16 | 17 | CREATE INDEX IF NOT EXISTS "IX_ReadModel-ThingyMessage_ThingyId" ON "ReadModel-ThingyMessage" 18 | ( 19 | ThingyId 20 | ); -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/Connections/IPostgresSqlConfiguration.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.PostgreSql.Connections 26 | { 27 | public interface IPostgreSqlConfiguration : ISqlConfiguration 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/Connections/IPostgresSqlConnection.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.PostgreSql.Connections 26 | { 27 | public interface IPostgreSqlConnection : ISqlConnection 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/Connections/IPostgresSqlConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.PostgreSql.Connections 26 | { 27 | public interface IPostgreSqlConnectionFactory : ISqlConnectionFactory 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/EventStores/Scripts/0001 - Create table EventFlow.sql: -------------------------------------------------------------------------------- 1 |  2 | CREATE TABLE IF NOT EXISTS EventFlow( 3 | GlobalSequenceNumber bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL, 4 | BatchId uuid NOT NULL, 5 | AggregateId varchar(255) NOT NULL, 6 | AggregateName varchar(255) NOT NULL, 7 | Data Text NOT NULL, 8 | Metadata Text NOT NULL, 9 | AggregateSequenceNumber int NOT NULL, 10 | CONSTRAINT "PK_EventFlow" PRIMARY KEY 11 | ( 12 | GlobalSequenceNumber 13 | ) 14 | ); 15 | 16 | 17 | CREATE UNIQUE INDEX IF NOT EXISTS "IX_EventFlow_AggregateId_AggregateSequenceNumber" ON EventFlow 18 | ( 19 | AggregateId, 20 | AggregateSequenceNumber 21 | ); 22 | 23 | -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/EventStores/Scripts/0002 - Create eventdatamodel_list_type.sql: -------------------------------------------------------------------------------- 1 | DO $$ 2 | BEGIN 3 | IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'eventdatamodel_list_type') THEN 4 | CREATE TYPE "eventdatamodel_list_type" AS 5 | ( 6 | AggregateId varchar(255), 7 | AggregateName varchar(255), 8 | AggregateSequenceNumber int, 9 | BatchId uuid, 10 | Data TEXT, 11 | Metadata TEXT 12 | ); 13 | END IF; 14 | END 15 | $$; -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/IPostgresSqlDatabaseMigrator.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Migrations; 24 | 25 | namespace EventFlow.PostgreSql 26 | { 27 | public interface IPostgreSqlDatabaseMigrator : ISqlDatabaseMigrator 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/RetryStrategies/IPostgresSqlErrorRetryStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.PostgreSql.RetryStrategies 26 | { 27 | public interface IPostgreSqlErrorRetryStrategy : IRetryStrategy 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.PostgreSql/SnapshotStores/Scripts/0001 - Create EventFlowSnapshots.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS EventFlowSnapshots( 2 | Id bigint GENERATED BY DEFAULT AS IDENTITY NOT NULL, 3 | AggregateId varchar(128) NOT NULL, 4 | AggregateName varchar(128) NOT NULL, 5 | AggregateSequenceNumber int NOT NULL, 6 | Data text NOT NULL, 7 | Metadata text NOT NULL, 8 | CONSTRAINT "PK_EventFlowSnapshots" PRIMARY KEY 9 | ( 10 | Id 11 | ) 12 | ); 13 | 14 | DO $$ 15 | BEGIN 16 | IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'IX_EventFlowSnapshots_AggregateId_AggregateSequenceNumber') THEN 17 | CREATE TYPE "IX_EventFlowSnapshots_AggregateId_AggregateSequenceNumber" AS 18 | ( 19 | AggregateName varchar(255), 20 | AggregateId varchar(255), 21 | AggregateSequenceNumber int 22 | ); 23 | END IF; 24 | END 25 | $$; -------------------------------------------------------------------------------- /Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Source/EventFlow.RabbitMQ.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.1;netcoreapp3.1;net6.0 4 | EventFlow.RabbitMQ 5 | EventFlow.RabbitMQ 6 | Rasmus Mikkelsen 7 | Rasmus Mikkelsen 8 | Copyright (c) Rasmus Mikkelsen 2015 - 2021 9 | RabbitMQ integration for EventFlow 10 | CQRS ES event sourcing MongoDB 11 | UPDATED BY BUILD 12 | true 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Source/EventFlow.RabbitMQ/IRabbitMqConfiguration.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.RabbitMQ 26 | { 27 | public interface IRabbitMqConfiguration 28 | { 29 | Uri Uri { get; } 30 | bool Persistent { get; } 31 | int ModelsPrConnection { get; } 32 | string Exchange { get; } 33 | } 34 | } -------------------------------------------------------------------------------- /Source/EventFlow.RabbitMQ/Integrations/IRabbitMqMessageFactory.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.RabbitMQ.Integrations 26 | { 27 | public interface IRabbitMqMessageFactory 28 | { 29 | RabbitMqMessage CreateMessage(IDomainEvent domainEvent); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.RabbitMQ/Integrations/IRabbitMqRetryStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.RabbitMQ.Integrations 26 | { 27 | public interface IRabbitMqRetryStrategy : IRetryStrategy 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.Redis.Tests/EventFlow.Redis.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EventFlow.Redis/Constants.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Redis; 24 | 25 | public static class Constants 26 | { 27 | public const string StreamPrefix = "eventflow.events"; 28 | public const string ReadModelPrefix = "eventflow.readmodel"; 29 | public const string SnapshotPrefix = "eventflow.snapshot"; 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.Redis/EventFlow.Redis.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Source/EventFlow.Redis/SnapshotStore/SnapshotId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Redis.SnapshotStore; 26 | 27 | public class SnapshotId : Identity 28 | { 29 | public SnapshotId(string value) : base(value) 30 | { 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0;net8.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Source/EventFlow.SQLite.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.SQLite/Connections/ISQLiteConfiguration.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.SQLite.Connections 26 | { 27 | public interface ISQLiteConfiguration : ISqlConfiguration 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.SQLite/Connections/ISQLiteConnection.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.SQLite.Connections 26 | { 27 | public interface ISQLiteConnection : ISqlConnection 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.SQLite/Connections/ISQLiteConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Sql.Connections; 24 | 25 | namespace EventFlow.SQLite.Connections 26 | { 27 | public interface ISQLiteConnectionFactory : ISqlConnectionFactory 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.SQLite/EventFlow.SQLite.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.1;netcoreapp3.1;net6.0;net8.0 4 | EventFlow.SQLite 5 | SQLite event store for EventFlow 6 | CQRS ES event sourcing SQLite 7 | bin\$(Configuration)\$(TargetFramework)\EventFlow.SQLite.xml 8 | true 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Source/EventFlow.SQLite/ReadStores/ISQLiteReadModelStore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ReadStores; 24 | using EventFlow.Sql.ReadModels; 25 | 26 | namespace EventFlow.SQLite.ReadStores 27 | { 28 | public interface ISQLiteReadModelStore : ISqlReadModelStore 29 | where TReadModel : class, IReadModel 30 | { 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow.SQLite/RetryStrategies/ISQLiteErrorRetryStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.SQLite.RetryStrategies 26 | { 27 | public interface ISQLiteErrorRetryStrategy : IRetryStrategy 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.SourceGenerators.Tests/EventFlow.SourceGenerators.Tests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1;net6.0;net8.0 5 | False 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0;net8.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Source/EventFlow.Sql.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Source/EventFlow.Sql/EventFlow.Sql.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netstandard2.1;netcoreapp3.1;net6.0;net8.0 4 | EventFlow.Sql 5 | Rasmus Mikkelsen 6 | Rasmus Mikkelsen 7 | Copyright (c) Rasmus Mikkelsen 2015 - 2021 8 | Generic SQL support for EventFlow 9 | CQRS ES event sourcing SQL 10 | UPDATED BY BUILD 11 | true 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Source/EventFlow.Sql/ReadModels/Attributes/SqlReadModelIdentityColumnAttribute.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Sql.ReadModels.Attributes 26 | { 27 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 28 | public class SqlReadModelIdentityColumnAttribute : Attribute 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.Sql/ReadModels/Attributes/SqlReadModelIgnoreColumnAttribute.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Sql.ReadModels.Attributes 26 | { 27 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 28 | public class SqlReadModelIgnoreColumnAttribute : Attribute 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.Sql/ReadModels/Attributes/SqlReadModelVersionColumnAttribute.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Sql.ReadModels.Attributes 26 | { 27 | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] 28 | public class SqlReadModelVersionColumnAttribute : Attribute 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.Sql/ReadModels/ISqlReadModelStore.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ReadStores; 24 | 25 | namespace EventFlow.Sql.ReadModels 26 | { 27 | public interface ISqlReadModelStore : IReadModelStore 28 | where TReadModel : class, IReadModel 29 | { 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Entities/ThingyMessageId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Entities 26 | { 27 | public class ThingyMessageId : Identity 28 | { 29 | public ThingyMessageId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Events/ThingySagaCompleteRequestedEvent.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Events 26 | { 27 | public class ThingySagaCompleteRequestedEvent : AggregateEvent 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Events/ThingySagaStartRequestedEvent.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Events 26 | { 27 | public class ThingySagaStartRequestedEvent : AggregateEvent 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Events/ThingyUpgradableV1Event.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Events 26 | { 27 | public class ThingyUpgradableV1Event : AggregateEvent 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Events/ThingyUpgradableV2Event.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Events 26 | { 27 | public class ThingyUpgradableV2Event : AggregateEvent 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Events/ThingyUpgradableV3Event.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Events 26 | { 27 | public class ThingyUpgradableV3Event : AggregateEvent 28 | { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Queries/DbContextQuery.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Queries; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Queries 26 | { 27 | public class DbContextQuery : IQuery{} 28 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Queries/IScopedContext.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.TestHelpers.Aggregates.Queries 24 | { 25 | public interface IScopedContext 26 | { 27 | string Id { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Sagas/Events/ThingySagaCompletedEvent.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates.Sagas.Events 26 | { 27 | public class ThingySagaCompletedEvent : AggregateEvent 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/Snapshots/ThingySnapshotVersion.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.TestHelpers.Aggregates.Snapshots 24 | { 25 | public enum ThingySnapshotVersion 26 | { 27 | Version1, 28 | Version2 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/Aggregates/ThingyId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.TestHelpers.Aggregates 26 | { 27 | public class ThingyId : Identity 28 | { 29 | public ThingyId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow.TestHelpers/EventFlowTestHelpers.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Reflection; 24 | 25 | namespace EventFlow.TestHelpers 26 | { 27 | public static class EventFlowTestHelpers 28 | { 29 | public static Assembly Assembly { get; } = typeof(EventFlowTestHelpers).Assembly; 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.Tests/EventFlow.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | netcoreapp3.1;net6.0;net8.0 4 | False 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Source/EventFlow.Tests/EventFlowTests.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Reflection; 24 | 25 | namespace EventFlow.Tests 26 | { 27 | public static class EventFlowTests 28 | { 29 | public static Assembly Assembly { get; } = typeof(EventFlowTests).Assembly; 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow.Tests/TestData/FilesEventStore/thingy-1acea1eb-3e11-45c0-83c1-bc32e57ee8e7/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "GlobalSequenceNumber": 1, 3 | "BatchId": "22b7f56a-406e-4ac2-842f-8f3d2f0fee20", 4 | "AggregateId": "thingy-1acea1eb-3e11-45c0-83c1-bc32e57ee8e7", 5 | "AggregateName": "TestAggregate", 6 | "Data": "{\"PingId\":{\"Value\":\"95433aa0-11f7-4128-bd5f-18e0ecc4d7c1\"}}", 7 | "Metadata": "{\"timestamp\":\"2015-05-07T22:08:57.4030553+02:00\",\"aggregate_sequence_number\":\"1\",\"event_name\":\"ThingyPing\",\"event_version\":\"1\"}", 8 | "AggregateSequenceNumber": 1 9 | } -------------------------------------------------------------------------------- /Source/EventFlow.Tests/TestData/FilesEventStore/thingy-1acea1eb-3e11-45c0-83c1-bc32e57ee8e7/2.json: -------------------------------------------------------------------------------- 1 | { 2 | "GlobalSequenceNumber": 2, 3 | "BatchId": "208a20e8-cd83-4eee-bf9e-dc32fefb7991", 4 | "AggregateId": "thingy-1acea1eb-3e11-45c0-83c1-bc32e57ee8e7", 5 | "AggregateName": "TestAggregate", 6 | "Data": "{\"PingId\":{\"Value\":\"2352d09b-4712-48cc-bb4f-5560d7c52558\"}}", 7 | "Metadata": "{\"timestamp\":\"2015-05-07T22:09:34.8387144+02:00\",\"aggregate_sequence_number\":\"2\",\"event_name\":\"ThingyPing\",\"event_version\":\"1\"}", 8 | "AggregateSequenceNumber": 2 9 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/AggregateName.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.ValueObjects; 24 | 25 | namespace EventFlow.Aggregates 26 | { 27 | public class AggregateName : SingleValueObject, IAggregateName 28 | { 29 | public AggregateName(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/EventId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Aggregates 26 | { 27 | public class EventId : Identity, IEventId 28 | { 29 | public EventId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/ExecutionResults/IExecutionResult.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Aggregates.ExecutionResults 24 | { 25 | public interface IExecutionResult 26 | { 27 | bool IsSuccess { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/IAggregateName.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Aggregates 26 | { 27 | public interface IAggregateName : IIdentity 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/IApply.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Aggregates 24 | { 25 | public interface IApply 26 | where TAggregateEvent : IAggregateEvent 27 | { 28 | void Apply(TAggregateEvent aggregateEvent); 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/IEmit.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Aggregates 24 | { 25 | public interface IEmit 26 | where TAggregateEvent : IAggregateEvent 27 | { 28 | void Apply(TAggregateEvent aggregateEvent); 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Aggregates/IEventId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | using EventFlow.Core; 25 | 26 | namespace EventFlow.Aggregates 27 | { 28 | public interface IEventId : ISourceId 29 | { 30 | Guid GetGuid(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/EventFlow/Commands/CommandId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Commands 26 | { 27 | public class CommandId : Identity, ICommandId 28 | { 29 | public CommandId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Commands/ICommandDefinitionService.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.Commands 26 | { 27 | public interface ICommandDefinitionService : IVersionedTypeDefinitionService 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Commands/ICommandId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Commands 26 | { 27 | public interface ICommandId : ISourceId 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Configuration/EventNamingStrategy/DefaultStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Configuration.EventNamingStrategy 26 | { 27 | internal class DefaultStrategy : IEventNamingStrategy 28 | { 29 | public string CreateEventName(int version, Type eventType, string name) => name; 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow/Configuration/EventNamingStrategy/IEventNamingStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Configuration.EventNamingStrategy 26 | { 27 | public interface IEventNamingStrategy 28 | { 29 | public string CreateEventName(int version, Type eventType, string name); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow/Configuration/Serialization/IJsonOptions.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using Newtonsoft.Json; 24 | 25 | namespace EventFlow.Configuration.Serialization 26 | { 27 | public interface IJsonOptions 28 | { 29 | void Apply(JsonSerializerSettings settings); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow/Core/IIdentity.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Core 24 | { 25 | public interface IIdentity 26 | { 27 | string Value { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow/Core/IJsonSerializer.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Core 26 | { 27 | public interface IJsonSerializer 28 | { 29 | string Serialize(object obj, bool indented = false); 30 | object Deserialize(string json, Type type); 31 | T Deserialize(string json); 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Core/IRetryStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Core 26 | { 27 | public interface IRetryStrategy 28 | { 29 | Retry ShouldThisBeRetried(Exception exception, TimeSpan totalExecutionTime, int currentRetryCount); 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow/Core/ISourceId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Core 24 | { 25 | public interface ISourceId : IIdentity 26 | { 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EventFlow/Core/RetryStrategies/IOptimisticConcurrencyRetryStrategy.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Core.RetryStrategies 24 | { 25 | public interface IOptimisticConcurrencyRetryStrategy : IRetryStrategy 26 | { 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EventFlow/Core/VersionedTypes/IVersionedType.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Core.VersionedTypes 24 | { 25 | public interface IVersionedType 26 | { 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EventFlow/EventStores/Files/IFilesEventLocator.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.EventStores.Files 26 | { 27 | public interface IFilesEventLocator 28 | { 29 | string GetEntityPath(IIdentity id); 30 | string GetEventPath(IIdentity id, int aggregateSequenceNumber); 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow/EventStores/Files/IFilesEventStoreConfiguration.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.EventStores.Files 24 | { 25 | public interface IFilesEventStoreConfiguration 26 | { 27 | string StorePath { get; } 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow/EventStores/ICommittedDomainEvent.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.EventStores 24 | { 25 | public interface ICommittedDomainEvent 26 | { 27 | string AggregateId { get; } 28 | string Data { get; } 29 | string Metadata { get; } 30 | int AggregateSequenceNumber { get; } 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow/EventStores/IEventDefinitionService.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.EventStores 26 | { 27 | public interface IEventDefinitionService : IVersionedTypeDefinitionService 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/EventStores/IUncommittedEvent.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Aggregates; 24 | 25 | namespace EventFlow.EventStores 26 | { 27 | public interface IUncommittedEvent 28 | { 29 | IAggregateEvent AggregateEvent { get; } 30 | IMetadata Metadata { get; } 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow/Exceptions/NoCommandHandlersException.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Exceptions 26 | { 27 | public class NoCommandHandlersException : Exception 28 | { 29 | public NoCommandHandlersException(string message) : base(message) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Jobs/IJobDefinitionService.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.Jobs 26 | { 27 | public interface IJobDefinitionService : IVersionedTypeDefinitionService 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Jobs/IJobId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Jobs 26 | { 27 | public interface IJobId : IIdentity 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Jobs/JobId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Jobs 26 | { 27 | public class JobId : Identity, IJobId 28 | { 29 | public JobId(string value) : base(value) 30 | { 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Runtime.CompilerServices; 24 | 25 | [assembly: InternalsVisibleTo("EventFlow.Tests")] 26 | -------------------------------------------------------------------------------- /Source/EventFlow/Queries/IQuery.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Queries 24 | { 25 | public interface IQuery 26 | { 27 | } 28 | 29 | public interface IQuery : IQuery 30 | { 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow/ReadStores/IReadModel.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.ReadStores 24 | { 25 | public interface IReadModel 26 | { 27 | } 28 | } -------------------------------------------------------------------------------- /Source/EventFlow/ReadStores/IReadModelContextFactory.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.ReadStores 24 | { 25 | public interface IReadModelContextFactory 26 | { 27 | IReadModelContext Create(string readModelId, bool isNew); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Source/EventFlow/ReadStores/IReadModelLocator.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Collections.Generic; 24 | using EventFlow.Aggregates; 25 | 26 | namespace EventFlow.ReadStores 27 | { 28 | public interface IReadModelLocator 29 | { 30 | IEnumerable GetReadModelIds(IDomainEvent domainEvent); 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow/Sagas/ISagaContext.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Sagas 24 | { 25 | public interface ISagaContext 26 | { 27 | // Empty for now 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow/Sagas/ISagaId.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core; 24 | 25 | namespace EventFlow.Sagas 26 | { 27 | public interface ISagaId : IIdentity 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Sagas/ISagaLocator.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Threading; 24 | using System.Threading.Tasks; 25 | using EventFlow.Aggregates; 26 | 27 | namespace EventFlow.Sagas 28 | { 29 | public interface ISagaLocator 30 | { 31 | Task LocateSagaAsync(IDomainEvent domainEvent, CancellationToken cancellationToken); 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Sagas/SagaContext.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Sagas 24 | { 25 | public class SagaContext : ISagaContext 26 | { 27 | public static ISagaContext Empty { get; } = new SagaContext(); 28 | } 29 | } -------------------------------------------------------------------------------- /Source/EventFlow/Sagas/SagaState.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Sagas 24 | { 25 | public enum SagaState 26 | { 27 | New, 28 | Running, 29 | Completed, 30 | } 31 | } -------------------------------------------------------------------------------- /Source/EventFlow/Snapshots/ISnapshot.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.Snapshots 26 | { 27 | public interface ISnapshot : IVersionedType 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Snapshots/ISnapshotDefinitionService.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.Snapshots 26 | { 27 | public interface ISnapshotDefinitionService : IVersionedTypeDefinitionService 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Snapshots/ISnapshotSerilizer.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System; 24 | 25 | namespace EventFlow.Snapshots 26 | { 27 | [Obsolete("Use 'ISnapshotSerializer' instead")] 28 | public interface ISnapshotSerilizer : ISnapshotSerializer 29 | { 30 | // EMPTY 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/EventFlow/Snapshots/ISnapshotUpgradeService.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.Snapshots 26 | { 27 | public interface ISnapshotUpgradeService : IVersionedTypeUpgradeService 28 | { 29 | } 30 | } -------------------------------------------------------------------------------- /Source/EventFlow/Snapshots/ISnapshotUpgrader.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using EventFlow.Core.VersionedTypes; 24 | 25 | namespace EventFlow.Snapshots 26 | { 27 | public interface ISnapshotUpgrader : IVersionedTypeUpgrader 28 | where TFrom : ISnapshot 29 | where TTo : ISnapshot 30 | { 31 | } 32 | } -------------------------------------------------------------------------------- /Source/EventFlow/Specifications/ISpecification.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | using System.Collections.Generic; 24 | 25 | namespace EventFlow.Specifications 26 | { 27 | public interface ISpecification 28 | { 29 | bool IsSatisfiedBy(T obj); 30 | 31 | IEnumerable WhyIsNotSatisfiedBy(T obj); 32 | } 33 | } -------------------------------------------------------------------------------- /Source/EventFlow/Subscribers/ISubscribe.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.Subscribers 24 | { 25 | public interface ISubscribe 26 | { 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Source/EventFlow/ValueObjects/ISingleValueObject.cs: -------------------------------------------------------------------------------- 1 | // The MIT License (MIT) 2 | // 3 | // Copyright (c) 2015-2025 Rasmus Mikkelsen 4 | // https://github.com/eventflow/EventFlow 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | // this software and associated documentation files (the "Software"), to deal in 8 | // the Software without restriction, including without limitation the rights to 9 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | // the Software, and to permit persons to whom the Software is furnished to do so, 11 | // subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in all 14 | // copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | // FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | 23 | namespace EventFlow.ValueObjects 24 | { 25 | public interface ISingleValueObject 26 | { 27 | object GetValue(); 28 | } 29 | } -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # Please note, some of the services can be installed on your machine 2 | 3 | version: '2.4' 4 | 5 | services: 6 | 7 | # If you have MS SQL Server installed locally you can comment this service or bind on different port 8 | mssql: 9 | image: mcr.microsoft.com/mssql/server:2017-latest 10 | container_name: mssql-ef 11 | environment: 12 | ACCEPT_EULA: Y 13 | SA_PASSWORD: Password12! 14 | ports: 15 | - "1433:1433" 16 | 17 | elasticsearch: 18 | image: docker.elastic.co/elasticsearch/elasticsearch:6.8.3 19 | container_name: elasticsearch-ef 20 | environment: 21 | - discovery.type=single-node 22 | - ES_JAVA_OPTS=-Xms1g -Xmx1g 23 | ports: 24 | - "9200:9200" 25 | - "9300:9300" 26 | mem_limit: 4g 27 | 28 | rabbitmq: 29 | image: rabbitmq:3-management-alpine 30 | container_name: rabbitmq-ef 31 | ports: 32 | - "5672:5672" 33 | - "15672:15672" 34 | 35 | eventstore: 36 | image: eventstore/eventstore:release-4.1.3 37 | container_name: eventstore-ef 38 | ports: 39 | - "1113:1113" 40 | - "2113:2113" 41 | 42 | postgres: 43 | image: postgres:10 44 | environment: 45 | POSTGRES_USER: postgres 46 | POSTGRES_PASSWORD: Password12! 47 | ports: 48 | - "5432:5432" 49 | -------------------------------------------------------------------------------- /icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eventflow/EventFlow/7c91526eaefd63887cb34072b81cfec50d63d598/icon-128.png -------------------------------------------------------------------------------- /icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eventflow/EventFlow/7c91526eaefd63887cb34072b81cfec50d63d598/icon-256.png -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: EventFlow 2 | site_url: https://geteventflow.net/ 3 | theme: material 4 | docs_dir: Documentation 5 | repo_name: EventFlow 6 | repo_url: https://github.com/eventflow/EventFlow 7 | edit_uri: edit/develop-v1/Documentation 8 | 9 | theme: 10 | name: material 11 | logo: assets/logo.png 12 | palette: 13 | scheme: slate 14 | primary: blue grey 15 | icon: 16 | repo: fontawesome/brands/github 17 | features: 18 | - content.action.edit 19 | - navigation.footer 20 | - header.autohide 21 | 22 | plugins: 23 | - search 24 | - git-committers: 25 | repository: eventflow/EventFlow 26 | branch: develop-v1 27 | 28 | markdown_extensions: 29 | - admonition 30 | - attr_list 31 | - pymdownx.details 32 | - pymdownx.superfences 33 | - pymdownx.highlight: 34 | linenums: true 35 | - pymdownx.emoji: 36 | emoji_index: !!python/name:material.extensions.emoji.twemoji 37 | emoji_generator: !!python/name:material.extensions.emoji.to_svg 38 | 39 | extra: 40 | social: 41 | - icon: fontawesome/brands/github 42 | link: https://github.com/eventflow/EventFlow/ 43 | - icon: fontawesome/brands/linkedin 44 | link: https://www.linkedin.com/in/rasmusmikkelsen/ 45 | - icon: fontawesome/brands/discord 46 | link: https://discord.gg/QfgNPs5WxR 47 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs-material 2 | mkdocs-git-committers-plugin-2 3 | 4 | --------------------------------------------------------------------------------