From 58aa1bad93096f64aab59701274cf0cc2bd9c5c0 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Tue, 12 Feb 2019 20:35:33 +0100 Subject: [PATCH 01/27] Version is now 0.70 --- RELEASE_NOTES.md | 10 +++++++--- appveyor.yml | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 8c9ae602c..0b1fb96cd 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,16 +1,20 @@ -### New in 0.69 (not released yet) +### New in 0.70 (not released yet) + +* _Nothing yet_ + +### New in 0.69.3772 (released 2019-02-12) * New: Added configuration option to set the "point of no return" when using cancellation tokens. After this point in processing, cancellation tokens are ignored: `options.Configure(c => c.CancellationBoundary = CancellationBoundary.BeforeCommittingEvents)` -* Fix: Added the schema `dbo` to the `eventdatamodel_list_type` in script - `0002 - Create eventdatamodel_list_type.sql` for `EventFlow.MsSql`. * New: Added `EventFlowOptions.RunOnStartup` extension method to register `IBootstrap` types that should run on application startup. * New: Support for async read model updates (`IAmAsyncReadModelFor`). You can mix and match asynchronous and synchronous updates, as long as you don't subscribe to the same event in both ways. +* Fix: Added the schema `dbo` to the `eventdatamodel_list_type` in script + `0002 - Create eventdatamodel_list_type.sql` for `EventFlow.MsSql`. * Fix: `LoadAllCommittedEvents` now correctly handles cases where the `GlobalSequenceNumber` column contains gaps larger than the page size. This bug lead to incomplete event application when using the `ReadModelPopulator` (see #564). diff --git a/appveyor.yml b/appveyor.yml index fb648f1cd..5403c6442 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,7 @@ init: - git config --global core.autocrlf input -version: 0.69.{build} +version: 0.70.{build} skip_tags: true From 7d6119f3948b628e4e526ae2ce5d42def57a0f1f Mon Sep 17 00:00:00 2001 From: Johnny Chan Date: Sat, 16 Feb 2019 12:08:12 +0000 Subject: [PATCH 02/27] Added .net core example --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 3410edd2a..21361c9a5 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,11 @@ the [do’s and don’ts](http://docs.geteventflow.net/DosAndDonts.html) and the [complete example](#complete-example). It features entities, a read model for an entity, delete on read models, specifications and snapshots. + * **[.Net Core:](https://github.com/johnny-chan/EventFlowDemo)** + A Web Api running .net core 2.2 using the event flow. It uses the pre-defined + command/entities/events from the [complete example](#complete-example). There are endpoints to + create a new example event, getting a data model and to replay all data models. + ### Overview Here is a list of the EventFlow concepts. Use the links to navigate From 7bbfefa5c67383012e9c9fdd618115a98fc4d194 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Sat, 16 Feb 2019 19:03:33 +0100 Subject: [PATCH 03/27] Minor corrections --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21361c9a5..f05d32105 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,8 @@ the [do’s and don’ts](http://docs.geteventflow.net/DosAndDonts.html) and the [complete example](#complete-example). It features entities, a read model for an entity, delete on read models, specifications and snapshots. - * **[.Net Core:](https://github.com/johnny-chan/EventFlowDemo)** - A Web Api running .net core 2.2 using the event flow. It uses the pre-defined + * **[.NET Core:](https://github.com/johnny-chan/EventFlowDemo)** + A Web API running .NET Core 2.2 using the event flow. It uses the pre-defined command/entities/events from the [complete example](#complete-example). There are endpoints to create a new example event, getting a data model and to replay all data models. From bc08eed97251e59ae2813b29bf6bdfe3e04b875b Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 16 Mar 2019 18:49:50 +0100 Subject: [PATCH 04/27] Upgrade FluentAssertions version to 5.6.0 --- .../IntegrationTests/Site/SiteTests.cs | 2 +- .../IntegrationTests/Scenarios.cs | 2 +- .../TransportLegsAreConnectedSpecificationTests.cs | 1 + .../Routing/RoutingServiceTests.cs | 1 + .../EventFlow.Examples.Shipping.Tests/Voyages.cs | 2 +- .../IntegrationTests/Site/SiteTests.cs | 2 +- .../EventFlow.TestHelpers.csproj | 2 +- .../Suites/TestSuiteForEventStore.cs | 8 ++++---- .../Suites/TestSuiteForReadModelStore.cs | 6 +++--- .../Suites/TestSuiteForServiceRegistration.cs | 14 +++++++------- .../Suites/TestSuiteForSnapshotStore.cs | 2 +- .../MultipleAggregateReadStoreManagerTests.cs | 2 +- .../IntegrationTests/Sagas/AggregateSagaTests.cs | 6 +++--- .../Sagas/AlternativeSagaStoreTests.cs | 2 +- .../IntegrationTests/UnicodeTests.cs | 6 +++--- .../UnitTests/Aggregates/AggregateRootTests.cs | 2 +- .../VersionedTypeDefinitionServiceTestSuite.cs | 2 +- .../ConcurrentFilesEventPersistanceTests.cs | 6 +++--- .../EventStores/EventDefinitionServiceTests.cs | 2 +- .../Snapshots/SnapshotUpgradeServiceTests.cs | 2 +- .../ReadStores/AggregateReadStoreManagerTests.cs | 8 ++++---- .../ValueObjects/SingleValueObjectTests.cs | 6 +++--- 22 files changed, 44 insertions(+), 42 deletions(-) diff --git a/Source/EventFlow.AspNetCore.Tests/IntegrationTests/Site/SiteTests.cs b/Source/EventFlow.AspNetCore.Tests/IntegrationTests/Site/SiteTests.cs index 3ca422ef1..0dc83904c 100644 --- a/Source/EventFlow.AspNetCore.Tests/IntegrationTests/Site/SiteTests.cs +++ b/Source/EventFlow.AspNetCore.Tests/IntegrationTests/Site/SiteTests.cs @@ -82,7 +82,7 @@ public void PublishCommand_WithNull_ThrowsException() // Arrange + Act Action action = () => Task.WaitAll(PostAsync("commands/ThingyPing/1", null)); - action.ShouldThrow("because of command is null."); + action.Should().Throw("because of command is null."); } private async Task GetAsync(string url) diff --git a/Source/EventFlow.Examples.Shipping.Tests/IntegrationTests/Scenarios.cs b/Source/EventFlow.Examples.Shipping.Tests/IntegrationTests/Scenarios.cs index fede29e26..a5e38b8ab 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/IntegrationTests/Scenarios.cs +++ b/Source/EventFlow.Examples.Shipping.Tests/IntegrationTests/Scenarios.cs @@ -37,7 +37,7 @@ using EventFlow.Extensions; using EventFlow.Logs; using EventFlow.TestHelpers; -using FluentAssertions; +using FluentAssertions.Extensions; using NUnit.Framework; namespace EventFlow.Examples.Shipping.Tests.IntegrationTests diff --git a/Source/EventFlow.Examples.Shipping.Tests/UnitTests/Domain/Model/CargoModel/Speficications/TransportLegsAreConnectedSpecificationTests.cs b/Source/EventFlow.Examples.Shipping.Tests/UnitTests/Domain/Model/CargoModel/Speficications/TransportLegsAreConnectedSpecificationTests.cs index 40ec39273..a77c3098f 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/UnitTests/Domain/Model/CargoModel/Speficications/TransportLegsAreConnectedSpecificationTests.cs +++ b/Source/EventFlow.Examples.Shipping.Tests/UnitTests/Domain/Model/CargoModel/Speficications/TransportLegsAreConnectedSpecificationTests.cs @@ -27,6 +27,7 @@ using EventFlow.Examples.Shipping.Domain.Model.VoyageModel.Entities; using EventFlow.TestHelpers; using FluentAssertions; +using FluentAssertions.Extensions; using NUnit.Framework; namespace EventFlow.Examples.Shipping.Tests.UnitTests.Domain.Model.CargoModel.Speficications diff --git a/Source/EventFlow.Examples.Shipping.Tests/UnitTests/ExternalServices/Routing/RoutingServiceTests.cs b/Source/EventFlow.Examples.Shipping.Tests/UnitTests/ExternalServices/Routing/RoutingServiceTests.cs index dbcd76087..3dd32d2df 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/UnitTests/ExternalServices/Routing/RoutingServiceTests.cs +++ b/Source/EventFlow.Examples.Shipping.Tests/UnitTests/ExternalServices/Routing/RoutingServiceTests.cs @@ -26,6 +26,7 @@ using EventFlow.Examples.Shipping.ExternalServices.Routing; using EventFlow.TestHelpers; using FluentAssertions; +using FluentAssertions.Extensions; using NUnit.Framework; namespace EventFlow.Examples.Shipping.Tests.UnitTests.ExternalServices.Routing diff --git a/Source/EventFlow.Examples.Shipping.Tests/Voyages.cs b/Source/EventFlow.Examples.Shipping.Tests/Voyages.cs index 836f4458c..f63a135fb 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/Voyages.cs +++ b/Source/EventFlow.Examples.Shipping.Tests/Voyages.cs @@ -24,7 +24,7 @@ using System.Collections.Generic; using EventFlow.Examples.Shipping.Domain.Model.VoyageModel; using EventFlow.Examples.Shipping.Domain.Model.VoyageModel.ValueObjects; -using FluentAssertions; +using FluentAssertions.Extensions; namespace EventFlow.Examples.Shipping.Tests { diff --git a/Source/EventFlow.Owin.Tests/IntegrationTests/Site/SiteTests.cs b/Source/EventFlow.Owin.Tests/IntegrationTests/Site/SiteTests.cs index d1d6e3a40..55b76fec2 100644 --- a/Source/EventFlow.Owin.Tests/IntegrationTests/Site/SiteTests.cs +++ b/Source/EventFlow.Owin.Tests/IntegrationTests/Site/SiteTests.cs @@ -76,7 +76,7 @@ public void PublishCommand_WithNull_ThrowsException() // Arrange + Act Action action = () => Task.WaitAll(PostAsync("commands/ThingyPing/1", null)); - action.ShouldThrow("because of command is null."); + action.Should().Throw("because of command is null."); } private Task GetAsync(string url) diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index 2194a7443..5826b33d5 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -26,7 +26,7 @@ - + diff --git a/Source/EventFlow.TestHelpers/Suites/TestSuiteForEventStore.cs b/Source/EventFlow.TestHelpers/Suites/TestSuiteForEventStore.cs index dc85042c7..49728ffe4 100644 --- a/Source/EventFlow.TestHelpers/Suites/TestSuiteForEventStore.cs +++ b/Source/EventFlow.TestHelpers/Suites/TestSuiteForEventStore.cs @@ -293,7 +293,7 @@ public async Task AggregatesCanUpdatedAfterOptimisticConcurrency() // Assert aggregate1 = await LoadAggregateAsync(id).ConfigureAwait(false); - aggregate1.PingsReceived.ShouldAllBeEquivalentTo(new[] {pingId1, pingId2}); + aggregate1.PingsReceived.Should().BeEquivalentTo(new[] {pingId1, pingId2}); } [Test] @@ -322,7 +322,7 @@ await commandBus.PublishAsync( // Assert var aggregate = await LoadAggregateAsync(id).ConfigureAwait(false); - aggregate.PingsReceived.ShouldAllBeEquivalentTo(new []{pingId1, pingId2}); + aggregate.PingsReceived.Should().BeEquivalentTo(new []{pingId1, pingId2}); } [Test] @@ -339,7 +339,7 @@ await CommandBus.PublishAsync( // Assert PublishedDomainEvents.Count.Should().Be(10); - PublishedDomainEvents.Select(d => d.AggregateSequenceNumber).ShouldAllBeEquivalentTo(Enumerable.Range(1, 10)); + PublishedDomainEvents.Select(d => d.AggregateSequenceNumber).Should().BeEquivalentTo(Enumerable.Range(1, 10)); } [Test] @@ -360,7 +360,7 @@ await CommandBus.PublishAsync( // Assert PublishedDomainEvents.Count.Should().Be(10); - PublishedDomainEvents.Select(d => d.AggregateSequenceNumber).ShouldAllBeEquivalentTo(Enumerable.Range(11, 10)); + PublishedDomainEvents.Select(d => d.AggregateSequenceNumber).Should().BeEquivalentTo(Enumerable.Range(11, 10)); } [Test] diff --git a/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs b/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs index e14122bc2..8f8d837ca 100644 --- a/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs +++ b/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs @@ -113,7 +113,7 @@ public async Task CanStoreMultipleMessages() // Assert returnedThingyMessages.Should().HaveCount(thingyMessages.Count); - returnedThingyMessages.ShouldAllBeEquivalentTo(thingyMessages); + returnedThingyMessages.Should().BeEquivalentTo(thingyMessages); } [Test] @@ -135,7 +135,7 @@ await CommandBus.PublishAsync(new ThingyImportCommand( // Assert thingy.PingsReceived.Should().Be(pingIds.Count); - returnedThingyMessages.ShouldAllBeEquivalentTo(returnedThingyMessages); + returnedThingyMessages.Should().BeEquivalentTo(thingyMessages); } [Test] @@ -306,7 +306,7 @@ public async Task CanStoreMessageHistory() // Assert returnedThingyMessages.Should().HaveCount(thingyMessages.Count); - returnedThingyMessages.ShouldAllBeEquivalentTo(thingyMessages); + returnedThingyMessages.Should().BeEquivalentTo(thingyMessages); } private class WaitState diff --git a/Source/EventFlow.TestHelpers/Suites/TestSuiteForServiceRegistration.cs b/Source/EventFlow.TestHelpers/Suites/TestSuiteForServiceRegistration.cs index de26a5640..36c6a2f46 100644 --- a/Source/EventFlow.TestHelpers/Suites/TestSuiteForServiceRegistration.cs +++ b/Source/EventFlow.TestHelpers/Suites/TestSuiteForServiceRegistration.cs @@ -165,7 +165,7 @@ public void ServiceViaGenericNotFoundThrowsException() { var resolver = Sut.CreateResolver(false); Action callingResolve = () => resolver.Resolve(); - callingResolve.ShouldThrow(); + callingResolve.Should().Throw(); } [Test] @@ -173,7 +173,7 @@ public void ServiceViaTypeNotFoundThrowsException() { var resolver = Sut.CreateResolver(false); Action callingResolve = () => resolver.Resolve(typeof(IMagicInterface)); - callingResolve.ShouldThrow(); + callingResolve.Should().Throw(); } [Test] @@ -402,7 +402,7 @@ public void AbstractMetadataProviderIsNotRegistered() }); // Assert - act.ShouldNotThrow(); + act.Should().NotThrow(); } public static void Assert_Decorator(IServiceRegistration serviceRegistration) @@ -445,7 +445,7 @@ public void AbstractSubscriberIsNotRegistered() }); // Assert - act.ShouldNotThrow(); + act.Should().NotThrow(); } public abstract class AbstractTestSubscriber : @@ -476,7 +476,7 @@ public void AbstractCommandHandlerIsNotRegistered() }); // Assert - act.ShouldNotThrow(); + act.Should().NotThrow(); } public abstract class AbstractTestCommandHandler : @@ -497,7 +497,7 @@ public void AbstractEventUpgraderIsNotRegistered() }); // Assert - act.ShouldNotThrow(); + act.Should().NotThrow(); } public abstract class AbstractTestEventUpgrader : IEventUpgrader @@ -519,7 +519,7 @@ public void AbstractQueryHandlerIsNotRegistered() }); // Assert - act.ShouldNotThrow(); + act.Should().NotThrow(); } [Test] diff --git a/Source/EventFlow.TestHelpers/Suites/TestSuiteForSnapshotStore.cs b/Source/EventFlow.TestHelpers/Suites/TestSuiteForSnapshotStore.cs index 9c8290fae..18152ae4d 100644 --- a/Source/EventFlow.TestHelpers/Suites/TestSuiteForSnapshotStore.cs +++ b/Source/EventFlow.TestHelpers/Suites/TestSuiteForSnapshotStore.cs @@ -197,7 +197,7 @@ public async Task OldSnapshotsAreUpgradedToLatestVersionAndAppliedToAggregate() // Assert thingyAggregate.Version.Should().Be(expectedVersion); - thingyAggregate.PingsReceived.ShouldAllBeEquivalentTo(pingIds); + thingyAggregate.PingsReceived.Should().BeEquivalentTo(pingIds); thingyAggregate.SnapshotVersions.Should().Contain(new[] {ThingySnapshotVersion.Version1, ThingySnapshotVersion.Version2}); } diff --git a/Source/EventFlow.Tests/IntegrationTests/ReadStores/MultipleAggregateReadStoreManagerTests.cs b/Source/EventFlow.Tests/IntegrationTests/ReadStores/MultipleAggregateReadStoreManagerTests.cs index eecb375cd..8aa4b914f 100644 --- a/Source/EventFlow.Tests/IntegrationTests/ReadStores/MultipleAggregateReadStoreManagerTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/ReadStores/MultipleAggregateReadStoreManagerTests.cs @@ -63,7 +63,7 @@ public async Task EventOrdering() // Assert var readModelAb = await QueryProcessor.ProcessAsync(new ReadModelByIdQuery(ReadModeld), CancellationToken.None); - readModelAb.Indexes.ShouldAllBeEquivalentTo( + readModelAb.Indexes.Should().BeEquivalentTo( new []{0, 1, 2, 3}, o => o.WithStrictOrdering()); } diff --git a/Source/EventFlow.Tests/IntegrationTests/Sagas/AggregateSagaTests.cs b/Source/EventFlow.Tests/IntegrationTests/Sagas/AggregateSagaTests.cs index 289d1146d..fd50e1dc5 100644 --- a/Source/EventFlow.Tests/IntegrationTests/Sagas/AggregateSagaTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/Sagas/AggregateSagaTests.cs @@ -157,17 +157,17 @@ public async Task PublishingStartAndCompleteWithPingsResultInCorrectMessages() // Assert - saga var thingySaga = await LoadSagaAsync(thingyId).ConfigureAwait(false); thingySaga.State.Should().Be(SagaState.Completed); - thingySaga.PingIdsSinceStarted.ShouldAllBeEquivalentTo(pingsWithRunningSaga); + thingySaga.PingIdsSinceStarted.Should().BeEquivalentTo(pingsWithRunningSaga); // Assert - aggregate var thingyAggregate = await LoadAggregateAsync(thingyId).ConfigureAwait(false); - thingyAggregate.PingsReceived.ShouldAllBeEquivalentTo( + thingyAggregate.PingsReceived.Should().BeEquivalentTo( pingsWithNewSaga.Concat(pingsWithRunningSaga).Concat(pingsWithCompletedSaga)); var receivedSagaPingIds = thingyAggregate.Messages .Select(m => PingId.With(m.Message)) .ToList(); receivedSagaPingIds.Should().HaveCount(3); - receivedSagaPingIds.ShouldAllBeEquivalentTo(pingsWithRunningSaga); + receivedSagaPingIds.Should().BeEquivalentTo(pingsWithRunningSaga); } protected override IRootResolver CreateRootResolver(IEventFlowOptions eventFlowOptions) diff --git a/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs b/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs index fa6aa8395..f60d5c885 100644 --- a/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/Sagas/AlternativeSagaStoreTests.cs @@ -115,7 +115,7 @@ public void SagaLocatorReturningNullDoesntThrow() Action action = () => _commandBus.Publish(new AlternativeSagaStoreTestClasses.SagaTestBCommand(aggregateId), CancellationToken.None); // Assert - action.ShouldNotThrow(); + action.Should().NotThrow(); } [Test] diff --git a/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs b/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs index f5a8ec116..9e0baf2d1 100644 --- a/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs +++ b/Source/EventFlow.Tests/IntegrationTests/UnicodeTests.cs @@ -46,7 +46,7 @@ public void UpperCaseIdentityThrows() Action action = () => new Identität1("Identität1-00000000-0000-0000-0000-000000000000"); // Assert - action.ShouldThrow(); + action.Should().Throw(); } [Test] @@ -79,7 +79,7 @@ public void UnicodeCommands() Action action = () => commandDefinitions.Load(typeof(Cömmand)); // Assert - action.ShouldNotThrow(); + action.Should().NotThrow(); } [Test] @@ -92,7 +92,7 @@ public void UnicodeEvents() Action action = () => eventDefinitionService.Load(typeof(Püng1Event)); // Assert - action.ShouldNotThrow(); + action.Should().NotThrow(); } [Test] diff --git a/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateRootTests.cs b/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateRootTests.cs index 3aca91f93..f98ee4797 100644 --- a/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateRootTests.cs +++ b/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateRootTests.cs @@ -150,7 +150,7 @@ public void ApplyEventWithOutOfOrderSequenceNumberShouldThrow() Action applyingEvents = () => Sut.ApplyEvents(new []{ domainEvent }); // Assert - applyingEvents.ShouldThrow(); + applyingEvents.Should().Throw(); } } } \ No newline at end of file diff --git a/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs b/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs index 1ac7374e1..feba5b707 100644 --- a/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs +++ b/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs @@ -206,7 +206,7 @@ public void GetAllDefinitions_WhenAllLoaded_ReturnsAll() .ToList(); // Assert - result.ShouldAllBeEquivalentTo(expectedTypes); + result.Should().BeEquivalentTo(expectedTypes); } [Test] diff --git a/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs b/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs index f791ff018..4cefb05d0 100644 --- a/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs +++ b/Source/EventFlow.Tests/UnitTests/EventStores/ConcurrentFilesEventPersistanceTests.cs @@ -97,7 +97,7 @@ public void MultipleInstancesWithSamePathFail() Action action = () => Task.WaitAll(tasks.ToArray()); // Assert - action.ShouldThrow("because of concurrent access to the same files."); + action.Should().Throw("because of concurrent access to the same files."); } [Test] @@ -114,7 +114,7 @@ public void MultipleInstancesWithDifferentPathsWork() Action action = () => Task.WaitAll(tasks.ToArray()); // Assert - action.ShouldNotThrow(); + action.Should().NotThrow(); } [Test] @@ -131,7 +131,7 @@ public void SingleInstanceWorks() Action action = () => Task.WaitAll(tasks.ToArray()); // Assert - action.ShouldNotThrow(); + action.Should().NotThrow(); } private IFilesEventStoreConfiguration ConfigurePath(string storePath) diff --git a/Source/EventFlow.Tests/UnitTests/EventStores/EventDefinitionServiceTests.cs b/Source/EventFlow.Tests/UnitTests/EventStores/EventDefinitionServiceTests.cs index b97e0be1a..f205b0b77 100644 --- a/Source/EventFlow.Tests/UnitTests/EventStores/EventDefinitionServiceTests.cs +++ b/Source/EventFlow.Tests/UnitTests/EventStores/EventDefinitionServiceTests.cs @@ -61,7 +61,7 @@ public void GetDefinitions_OnEventWithMultipleDefinitions_ReturnsThemAll() eventDefinitions.Should().HaveCount(3); eventDefinitions .Select(d => $"{d.Name}-V{d.Version}") - .ShouldAllBeEquivalentTo(new []{"multi-names-event-V1", "MultiNamesEvent-V1", "MultiNamesEvent-V2"}); + .Should().BeEquivalentTo(new []{"multi-names-event-V1", "MultiNamesEvent-V1", "MultiNamesEvent-V2"}); } [EventVersion("Fancy", 42)] diff --git a/Source/EventFlow.Tests/UnitTests/EventStores/Snapshots/SnapshotUpgradeServiceTests.cs b/Source/EventFlow.Tests/UnitTests/EventStores/Snapshots/SnapshotUpgradeServiceTests.cs index 60b1a8d13..e6717bb29 100644 --- a/Source/EventFlow.Tests/UnitTests/EventStores/Snapshots/SnapshotUpgradeServiceTests.cs +++ b/Source/EventFlow.Tests/UnitTests/EventStores/Snapshots/SnapshotUpgradeServiceTests.cs @@ -67,7 +67,7 @@ public async Task UpgradeAsync() // Assert snapshot.Should().BeOfType(); var snapshotV3 = (ThingySnapshot) snapshot; - snapshotV3.PingsReceived.ShouldAllBeEquivalentTo(pingIds); + snapshotV3.PingsReceived.Should().BeEquivalentTo(pingIds); snapshotV3.PreviousVersions.Should().Contain(ThingySnapshotVersion.Version1); snapshotV3.PreviousVersions.Should().Contain(ThingySnapshotVersion.Version2); } diff --git a/Source/EventFlow.Tests/UnitTests/ReadStores/AggregateReadStoreManagerTests.cs b/Source/EventFlow.Tests/UnitTests/ReadStores/AggregateReadStoreManagerTests.cs index 7bd3d343e..5ebbc6ce9 100644 --- a/Source/EventFlow.Tests/UnitTests/ReadStores/AggregateReadStoreManagerTests.cs +++ b/Source/EventFlow.Tests/UnitTests/ReadStores/AggregateReadStoreManagerTests.cs @@ -74,7 +74,7 @@ public async Task EventsAreApplied() // Assert AppliedDomainEvents.Should().HaveCount(emittedEvents.Length); - AppliedDomainEvents.ShouldAllBeEquivalentTo(emittedEvents); + AppliedDomainEvents.Should().BeEquivalentTo(emittedEvents); } [Test] @@ -149,7 +149,7 @@ public async Task StoredEventsAreAppliedIfThereAreMissingEvents() // Assert AppliedDomainEvents.Should().HaveCount(storedEvents.Length); - AppliedDomainEvents.ShouldAllBeEquivalentTo(storedEvents); + AppliedDomainEvents.Should().BeEquivalentTo(storedEvents); } [Test] @@ -161,7 +161,7 @@ public void ThrowsIfReadModelSubscribesNoEvents() ReadModelWithoutEvents>(null, null, null, null, null); }; - a.ShouldThrow().WithInnerMessage("*does not implement any*"); + a.Should().Throw().WithInnerException().WithMessage("*does not implement any*"); } [Test] @@ -173,7 +173,7 @@ public void ThrowsIfReadModelSubscribesSameEventTwice() ReadModelWithAmbigiousEvents>(null, null, null, null, null); }; - a.ShouldThrow().WithInnerMessage("*implements ambiguous*"); + a.Should().Throw().WithInnerException().WithMessage("*implements ambiguous*"); } private class ReadModelWithoutEvents : IReadModel diff --git a/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs b/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs index 9a6a26c6e..9ee24c562 100644 --- a/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs +++ b/Source/EventFlow.Tests/UnitTests/ValueObjects/SingleValueObjectTests.cs @@ -64,7 +64,7 @@ public void Ordering() var orderedSingleValueObjects = singleValueObjects.OrderBy(v => v).ToList(); // Assert - orderedSingleValueObjects.Select(v => v.Value).ShouldAllBeEquivalentTo( + orderedSingleValueObjects.Select(v => v.Value).Should().BeEquivalentTo( orderedValues, o => o.WithStrictOrdering()); } @@ -82,7 +82,7 @@ public void EnumOrdering() var orderedSingleValueObjects = singleValueObjects.OrderBy(v => v).ToList(); // Assert - orderedSingleValueObjects.Select(v => v.Value).ShouldAllBeEquivalentTo( + orderedSingleValueObjects.Select(v => v.Value).Should().BeEquivalentTo( orderedValues, o => o.WithStrictOrdering()); } @@ -115,7 +115,7 @@ public void EnumOrderingManual() .ToList(); // Assert - orderedValues.ShouldAllBeEquivalentTo( + orderedValues.Should().BeEquivalentTo( new [] { MagicEnum.Zero, From a7aec711f84e032850fa6b6460333bf301910cab Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 16 Mar 2019 19:00:21 +0100 Subject: [PATCH 05/27] Upgrade NUnit version to 3.11.0 --- Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index 5826b33d5..56a910c6a 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -28,7 +28,7 @@ - + From d76b594f5340c5af20bee832d614e8315a740e6e Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 16 Mar 2019 19:14:46 +0100 Subject: [PATCH 06/27] Upgrade minimal .NET framework version to 4.5.2 --- .../EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj | 2 +- Source/EventFlow.Autofac/EventFlow.Autofac.csproj | 6 +++--- .../EventFlow.Elasticsearch.Tests.csproj | 2 +- .../EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj | 2 +- .../EventFlow.Examples.Shipping.Queries.InMemory.csproj | 2 +- .../EventFlow.Examples.Shipping.Tests.csproj | 2 +- .../EventFlow.Examples.Shipping.csproj | 2 +- .../EventFlow.Hangfire.Tests.csproj | 2 +- Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj | 2 +- Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj | 2 +- Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj | 2 +- Source/EventFlow.MsSql/EventFlow.MsSql.csproj | 2 +- Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj | 2 +- Source/EventFlow.Owin/EventFlow.Owin.csproj | 2 +- .../EventFlow.PostgreSql.Tests.csproj | 2 +- Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj | 2 +- .../EventFlow.RabbitMQ.Tests.csproj | 2 +- Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj | 2 +- Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj | 2 +- Source/EventFlow.SQLite/EventFlow.SQLite.csproj | 2 +- Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj | 2 +- Source/EventFlow.Sql/EventFlow.Sql.csproj | 4 ++-- Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj | 2 +- Source/EventFlow.Tests/EventFlow.Tests.csproj | 2 +- Source/EventFlow/Core/Caching/MemoryCache.cs | 2 +- Source/EventFlow/EventFlow.csproj | 4 ++-- Source/EventFlow/EventFlowOptions.cs | 2 +- 27 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj b/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj index 99dedd8ad..a65c955ac 100644 --- a/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj +++ b/Source/EventFlow.Autofac.Tests/EventFlow.Autofac.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj index 0599a27d9..3352b8798 100644 --- a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj +++ b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj @@ -1,7 +1,7 @@  - + - net451;netstandard1.6;netstandard2.0 + net452;netstandard1.6;netstandard2.0 True True False @@ -20,7 +20,7 @@ en-US UPDATED BY BUILD - + diff --git a/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj b/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj index dc5cad552..743244fb6 100644 --- a/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj +++ b/Source/EventFlow.Elasticsearch.Tests/EventFlow.Elasticsearch.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj index ead84c393..d69e53755 100644 --- a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj +++ b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6;netstandard2.0 + net452;netstandard1.6;netstandard2.0 True True False diff --git a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj index 7ba7e32f8..ac4539cc9 100644 --- a/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj +++ b/Source/EventFlow.Examples.Shipping.Queries.InMemory/EventFlow.Examples.Shipping.Queries.InMemory.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj b/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj index fd96fb805..049d91e60 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj +++ b/Source/EventFlow.Examples.Shipping.Tests/EventFlow.Examples.Shipping.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj b/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj index 94b95c9c4..08e3c55a8 100644 --- a/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj +++ b/Source/EventFlow.Examples.Shipping/EventFlow.Examples.Shipping.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj b/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj index 4c1ce80bd..1bbd88abf 100644 --- a/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj +++ b/Source/EventFlow.Hangfire.Tests/EventFlow.Hangfire.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj index a0e60fdaa..0967e489c 100644 --- a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj +++ b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6;netstandard2.0 + net452;netstandard1.6;netstandard2.0 True True False diff --git a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj index 7975335ae..67d7d5e83 100644 --- a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj +++ b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6 + net452;netstandard1.6 EventFlow.MongoDB True False diff --git a/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj b/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj index adf9858d2..3873e3e67 100644 --- a/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj +++ b/Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj index 00180d0d3..36f80af09 100644 --- a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj +++ b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6;netstandard2.0 + net452;netstandard1.6;netstandard2.0 True True False diff --git a/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj b/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj index eec6eee8f..bf2e6a6fd 100644 --- a/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj +++ b/Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Owin/EventFlow.Owin.csproj b/Source/EventFlow.Owin/EventFlow.Owin.csproj index 37ef9f821..51634d60b 100644 --- a/Source/EventFlow.Owin/EventFlow.Owin.csproj +++ b/Source/EventFlow.Owin/EventFlow.Owin.csproj @@ -1,7 +1,7 @@  - net451 + net452 True True False diff --git a/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj b/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj index 44f9fdf49..13dd078ca 100644 --- a/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj +++ b/Source/EventFlow.PostgreSql.Tests/EventFlow.PostgreSql.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj index 1b86a3775..e2cbad495 100644 --- a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj +++ b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj @@ -1,7 +1,7 @@  - net451;netstandard2.0 + net452;netstandard2.0 True True False diff --git a/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj b/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj index 43b7c58be..6130cac07 100644 --- a/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj +++ b/Source/EventFlow.RabbitMQ.Tests/EventFlow.RabbitMQ.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj index 2be601f6f..ee6a8225c 100644 --- a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj +++ b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6 + net452;netstandard1.6 True True False diff --git a/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj b/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj index 8a66fd26b..8971d9153 100644 --- a/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj +++ b/Source/EventFlow.SQLite.Tests/EventFlow.SQLite.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj index 6ffc3ce42..f18c757f3 100644 --- a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj +++ b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj @@ -1,7 +1,7 @@  - net451;netstandard2.0 + net452;netstandard2.0 True True False diff --git a/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj b/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj index 4e32fbc0e..1582e7b4a 100644 --- a/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj +++ b/Source/EventFlow.Sql.Tests/EventFlow.Sql.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow.Sql/EventFlow.Sql.csproj b/Source/EventFlow.Sql/EventFlow.Sql.csproj index 8a8d17c06..d0d383048 100644 --- a/Source/EventFlow.Sql/EventFlow.Sql.csproj +++ b/Source/EventFlow.Sql/EventFlow.Sql.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6;netstandard2.0 + net452;netstandard1.6;netstandard2.0 True True False @@ -33,6 +33,6 @@ - + \ No newline at end of file diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index 56a910c6a..b94c2310e 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False False diff --git a/Source/EventFlow.Tests/EventFlow.Tests.csproj b/Source/EventFlow.Tests/EventFlow.Tests.csproj index 074d66d34..c37ac947d 100644 --- a/Source/EventFlow.Tests/EventFlow.Tests.csproj +++ b/Source/EventFlow.Tests/EventFlow.Tests.csproj @@ -1,7 +1,7 @@  - net451 + net452 True False diff --git a/Source/EventFlow/Core/Caching/MemoryCache.cs b/Source/EventFlow/Core/Caching/MemoryCache.cs index 7a015954e..6fb9c1981 100644 --- a/Source/EventFlow/Core/Caching/MemoryCache.cs +++ b/Source/EventFlow/Core/Caching/MemoryCache.cs @@ -21,7 +21,7 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET451 +#if NET452 using System; using System.Runtime.Caching; diff --git a/Source/EventFlow/EventFlow.csproj b/Source/EventFlow/EventFlow.csproj index c4d4eef78..9c1be1928 100644 --- a/Source/EventFlow/EventFlow.csproj +++ b/Source/EventFlow/EventFlow.csproj @@ -1,7 +1,7 @@  - net451;netstandard1.6;netstandard2.0 + net452;netstandard1.6;netstandard2.0 True True False @@ -32,7 +32,7 @@ All - + \ No newline at end of file diff --git a/Source/EventFlow/EventFlowOptions.cs b/Source/EventFlow/EventFlowOptions.cs index 111637d44..46c4a600a 100644 --- a/Source/EventFlow/EventFlowOptions.cs +++ b/Source/EventFlow/EventFlowOptions.cs @@ -222,7 +222,7 @@ private void RegisterDefaults(IServiceRegistration serviceRegistration) serviceRegistration.Register(); serviceRegistration.Register(); serviceRegistration.Register(); -#if NET451 +#if NET452 serviceRegistration.Register(Lifetime.Singleton); #else serviceRegistration.Register(Lifetime.Singleton); From 26419d9913c2bf115950bce0d4d92d12f37fd940 Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 16 Mar 2019 19:19:10 +0100 Subject: [PATCH 07/27] Upgrade minimal .NET framework version to 4.5.2 --- Source/EventFlow.Autofac.Tests/app.config | 2 +- Source/EventFlow.Elasticsearch.Tests/app.config | 2 +- Source/EventFlow.EventStores.EventStore.Tests/app.config | 2 +- Source/EventFlow.Examples.Shipping.Tests/app.config | 2 +- Source/EventFlow.Hangfire.Tests/app.config | 2 +- Source/EventFlow.MongoDB.Tests/app.config | 2 +- Source/EventFlow.MsSql.Tests/app.config | 2 +- Source/EventFlow.Owin.Tests/app.config | 2 +- Source/EventFlow.PostgreSql.Tests/app.config | 2 +- Source/EventFlow.RabbitMQ.Tests/app.config | 2 +- Source/EventFlow.SQLite.Tests/app.config | 2 +- Source/EventFlow.Sql.Tests/app.config | 2 +- Source/EventFlow.TestHelpers/app.config | 2 +- Source/EventFlow.Tests/app.config | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Source/EventFlow.Autofac.Tests/app.config b/Source/EventFlow.Autofac.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.Autofac.Tests/app.config +++ b/Source/EventFlow.Autofac.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.Elasticsearch.Tests/app.config b/Source/EventFlow.Elasticsearch.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.Elasticsearch.Tests/app.config +++ b/Source/EventFlow.Elasticsearch.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.EventStores.EventStore.Tests/app.config b/Source/EventFlow.EventStores.EventStore.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.EventStores.EventStore.Tests/app.config +++ b/Source/EventFlow.EventStores.EventStore.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.Examples.Shipping.Tests/app.config b/Source/EventFlow.Examples.Shipping.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.Examples.Shipping.Tests/app.config +++ b/Source/EventFlow.Examples.Shipping.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.Hangfire.Tests/app.config b/Source/EventFlow.Hangfire.Tests/app.config index b4d0b5fb8..48b7bb111 100644 --- a/Source/EventFlow.Hangfire.Tests/app.config +++ b/Source/EventFlow.Hangfire.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.MongoDB.Tests/app.config b/Source/EventFlow.MongoDB.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.MongoDB.Tests/app.config +++ b/Source/EventFlow.MongoDB.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.MsSql.Tests/app.config b/Source/EventFlow.MsSql.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.MsSql.Tests/app.config +++ b/Source/EventFlow.MsSql.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.Owin.Tests/app.config b/Source/EventFlow.Owin.Tests/app.config index bc93d152f..395954ca5 100644 --- a/Source/EventFlow.Owin.Tests/app.config +++ b/Source/EventFlow.Owin.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.PostgreSql.Tests/app.config b/Source/EventFlow.PostgreSql.Tests/app.config index a71fe2a42..b34d158b8 100644 --- a/Source/EventFlow.PostgreSql.Tests/app.config +++ b/Source/EventFlow.PostgreSql.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.RabbitMQ.Tests/app.config b/Source/EventFlow.RabbitMQ.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.RabbitMQ.Tests/app.config +++ b/Source/EventFlow.RabbitMQ.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.SQLite.Tests/app.config b/Source/EventFlow.SQLite.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.SQLite.Tests/app.config +++ b/Source/EventFlow.SQLite.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.Sql.Tests/app.config b/Source/EventFlow.Sql.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.Sql.Tests/app.config +++ b/Source/EventFlow.Sql.Tests/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.TestHelpers/app.config b/Source/EventFlow.TestHelpers/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.TestHelpers/app.config +++ b/Source/EventFlow.TestHelpers/app.config @@ -1,7 +1,7 @@ - + diff --git a/Source/EventFlow.Tests/app.config b/Source/EventFlow.Tests/app.config index 069e3fd6d..d05299f92 100644 --- a/Source/EventFlow.Tests/app.config +++ b/Source/EventFlow.Tests/app.config @@ -1,7 +1,7 @@ - + From 51149c3669a561709767a5849fe4825284f6bd44 Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 16 Mar 2019 22:09:29 +0100 Subject: [PATCH 08/27] Upgrade AutoFixture.AutoMoq version to 4.8.0 --- .../UnitTests/Integrations/RabbitMqPublisherTests.cs | 2 +- Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj | 2 +- .../Suites/TestSuiteForReadModelStore.cs | 2 +- Source/EventFlow.TestHelpers/Test.cs | 4 ++-- Source/EventFlow.TestHelpers/TestsFor.cs | 4 ++-- .../UnitTests/Aggregates/AggregateStoreTests.cs | 2 +- .../VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/EventFlow.RabbitMQ.Tests/UnitTests/Integrations/RabbitMqPublisherTests.cs b/Source/EventFlow.RabbitMQ.Tests/UnitTests/Integrations/RabbitMqPublisherTests.cs index bc4f387d5..ba013e384 100644 --- a/Source/EventFlow.RabbitMQ.Tests/UnitTests/Integrations/RabbitMqPublisherTests.cs +++ b/Source/EventFlow.RabbitMQ.Tests/UnitTests/Integrations/RabbitMqPublisherTests.cs @@ -29,9 +29,9 @@ using EventFlow.Logs; using EventFlow.RabbitMQ.Integrations; using EventFlow.TestHelpers; +using AutoFixture; using Moq; using NUnit.Framework; -using Ploeh.AutoFixture; using RabbitMQ.Client; namespace EventFlow.RabbitMQ.Tests.UnitTests.Integrations diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index b94c2310e..e315b4299 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -25,7 +25,7 @@ UPDATED BY BUILD - + diff --git a/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs b/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs index 8f8d837ca..fcb3ae16e 100644 --- a/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs +++ b/Source/EventFlow.TestHelpers/Suites/TestSuiteForReadModelStore.cs @@ -35,9 +35,9 @@ using EventFlow.TestHelpers.Aggregates.Queries; using EventFlow.TestHelpers.Aggregates.ValueObjects; using EventFlow.TestHelpers.Extensions; +using AutoFixture; using FluentAssertions; using NUnit.Framework; -using Ploeh.AutoFixture; namespace EventFlow.TestHelpers.Suites { diff --git a/Source/EventFlow.TestHelpers/Test.cs b/Source/EventFlow.TestHelpers/Test.cs index 2c55cd7c1..fc8e3ebf8 100644 --- a/Source/EventFlow.TestHelpers/Test.cs +++ b/Source/EventFlow.TestHelpers/Test.cs @@ -30,10 +30,10 @@ using EventFlow.Logs; using EventFlow.TestHelpers.Aggregates; using EventFlow.TestHelpers.Aggregates.Entities; +using AutoFixture; +using AutoFixture.AutoMoq; using Moq; using NUnit.Framework; -using Ploeh.AutoFixture; -using Ploeh.AutoFixture.AutoMoq; namespace EventFlow.TestHelpers { diff --git a/Source/EventFlow.TestHelpers/TestsFor.cs b/Source/EventFlow.TestHelpers/TestsFor.cs index f2cf3ec56..907a14d6f 100644 --- a/Source/EventFlow.TestHelpers/TestsFor.cs +++ b/Source/EventFlow.TestHelpers/TestsFor.cs @@ -22,14 +22,14 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. using System; +using AutoFixture; using NUnit.Framework; -using Ploeh.AutoFixture; namespace EventFlow.TestHelpers { public abstract class TestsFor : Test { - private Lazy _lazySut; + private Lazy _lazySut; protected TSut Sut => _lazySut.Value; [SetUp] diff --git a/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateStoreTests.cs b/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateStoreTests.cs index 099874122..b1978c94f 100644 --- a/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateStoreTests.cs +++ b/Source/EventFlow.Tests/UnitTests/Aggregates/AggregateStoreTests.cs @@ -39,9 +39,9 @@ using EventFlow.TestHelpers.Aggregates.Events; using EventFlow.TestHelpers.Aggregates.ValueObjects; using EventFlow.TestHelpers.Extensions; +using AutoFixture; using Moq; using NUnit.Framework; -using Ploeh.AutoFixture; namespace EventFlow.Tests.UnitTests.Aggregates { diff --git a/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs b/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs index feba5b707..bf54bf1f8 100644 --- a/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs +++ b/Source/EventFlow.Tests/UnitTests/Core/VersionedTypes/VersionedTypeDefinitionServiceTestSuite.cs @@ -26,9 +26,9 @@ using System.Linq; using EventFlow.Core.VersionedTypes; using EventFlow.TestHelpers; +using AutoFixture; using FluentAssertions; using NUnit.Framework; -using Ploeh.AutoFixture; namespace EventFlow.Tests.UnitTests.Core.VersionedTypes { From 94e2d937d68f8672c5cf8ba010c7d8bea7bbc4c5 Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 16 Mar 2019 23:04:21 +0100 Subject: [PATCH 09/27] Upgrade Test.Sdk version to 16.0.1 Upgrade MSTest.TestFramework version to 1.4.0 --- .../EventFlow.AspNetCore.Tests.csproj | 8 ++++---- .../EventFlow.DependencyInjection.Tests.csproj | 6 +++--- .../EventFlow.EntityFramework.Tests.csproj | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj b/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj index 7fd1cbd02..a54693a44 100644 --- a/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj +++ b/Source/EventFlow.AspNetCore.Tests/EventFlow.AspNetCore.Tests.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj b/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj index b0e1f1bb9..64c21f448 100644 --- a/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj +++ b/Source/EventFlow.DependencyInjection.Tests/EventFlow.DependencyInjection.Tests.csproj @@ -7,9 +7,9 @@ - - - + + + diff --git a/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj b/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj index 56e4510de..220cada80 100644 --- a/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj +++ b/Source/EventFlow.EntityFramework.Tests/EventFlow.EntityFramework.Tests.csproj @@ -9,9 +9,9 @@ - - - + + + From d1bea529baa0d24a6fd8b75a79805e777e3c85e3 Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Mon, 18 Mar 2019 23:06:49 +0100 Subject: [PATCH 10/27] Update RELEASE_NOTES --- RELEASE_NOTES.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 0b1fb96cd..d9a723698 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,6 +1,37 @@ ### New in 0.70 (not released yet) -* _Nothing yet_ +* Breaking: Changed target framework for: + - `EventFlow`, + - `EventFlow.Tests`, + - `EventFlow.TestHelpers`, + - `EventFlow.AspNetCore.Tests`, + - `EventFlow.Autofac`, + - `EventFlow.Autofac.Tests`, + - `EventFlow.DependencyInjection.Tests`, + - `EventFlow.Elasticsearch`, + - `EventFlow.Elasticsearch.Tests`, + - `EventFlow.EntityFramework.Tests`, + - `EventFlow.Examples.Shipping`, + - `EventFlow.Examples.Shipping.Tests`, + - `EventFlow.Examples.Shipping.Queries.InMemory`, + - `EventFlow.Hangfire`, + - `EventFlow.Hangfire.Tests`, + - `EventFlow.MongoDB`, + - `EventFlow.MsSql`, + - `EventFlow.MsSql.Tests`, + - `EventFlow.Owin`, + - `EventFlow.Owin.Tests`, + - `EventFlow.PostgreSql`, + - `EventFlow.PostgreSql.Tests`, + - `EventFlow.RabbitMQ`, + - `EventFlow.RabbitMQ.Tests` + - `EventFlow.Sql`, + - `EventFlow.Sql.Tests`, + - `EventFlow.SQLite`, + - `EventFlow.SQLite.Tests` + + to .NET 4.5.2 as required by `AutoFixture.AutoMoq` NuGet dependency and to align packages on the + [latest supported release](https://github.com/Microsoft/dotnet/blob/master/releases/README.md). ### New in 0.69.3772 (released 2019-02-12) From adf390e2b2936d9d29d4056369d272538eb15506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bi=C4=8Dan?= Date: Sat, 16 Mar 2019 12:10:56 +0000 Subject: [PATCH 11/27] EF-605: use EventId as SourceId for external event delivered to saga instead of event.SourceId --- Source/EventFlow/Sagas/DispatchToSagas.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/EventFlow/Sagas/DispatchToSagas.cs b/Source/EventFlow/Sagas/DispatchToSagas.cs index f6170b8db..f8928779c 100644 --- a/Source/EventFlow/Sagas/DispatchToSagas.cs +++ b/Source/EventFlow/Sagas/DispatchToSagas.cs @@ -104,7 +104,7 @@ private async Task ProcessSagaAsync( await _sagaStore.UpdateAsync( sagaId, details.SagaType, - domainEvent.Metadata.SourceId, + domainEvent.Metadata.EventId, (s, c) => UpdateSagaAsync(s, domainEvent, details, c), cancellationToken) .ConfigureAwait(false); From 88424b1ee9dbd9e30d46083a125798e840ecc1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bi=C4=8Dan?= Date: Sat, 16 Mar 2019 12:39:37 +0000 Subject: [PATCH 12/27] #605 Fix unit tests by adding EventId into event --- Source/EventFlow.TestHelpers/Test.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/EventFlow.TestHelpers/Test.cs b/Source/EventFlow.TestHelpers/Test.cs index fc8e3ebf8..e3b809cab 100644 --- a/Source/EventFlow.TestHelpers/Test.cs +++ b/Source/EventFlow.TestHelpers/Test.cs @@ -120,6 +120,7 @@ protected IDomainEvent ToDomainEvent { Timestamp = A(), SourceId = A(), + EventId = A(), }; if (aggregateSequenceNumber == 0) From cbf857dc90477b59fca9cb5c2c6331e0253a15ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bi=C4=8Dan?= Date: Sat, 30 Mar 2019 13:38:47 +0000 Subject: [PATCH 13/27] EF-605: Update RELEASE_NOTES --- RELEASE_NOTES.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d9a723698..4df869265 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -33,6 +33,10 @@ to .NET 4.5.2 as required by `AutoFixture.AutoMoq` NuGet dependency and to align packages on the [latest supported release](https://github.com/Microsoft/dotnet/blob/master/releases/README.md). + * Fix: `DispatchToSagas.ProcessSagaAsync` use `EventId` instead of `SourceId` as `SourceId` + for delivery of external event to AggregateSaga + + ### New in 0.69.3772 (released 2019-02-12) * New: Added configuration option to set the "point of no return" when using From 76f1e8e625a085abf86fb51a43e600ccfec1b18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bi=C4=8Dan?= Date: Sat, 30 Mar 2019 13:57:45 +0000 Subject: [PATCH 14/27] #605 Add unit test SagaStoreReceivesEventIdAsSourceId() --- .../UnitTests/Sagas/DispatchToSagasTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/EventFlow.Tests/UnitTests/Sagas/DispatchToSagasTests.cs b/Source/EventFlow.Tests/UnitTests/Sagas/DispatchToSagasTests.cs index d7d846a07..a2000060b 100644 --- a/Source/EventFlow.Tests/UnitTests/Sagas/DispatchToSagasTests.cs +++ b/Source/EventFlow.Tests/UnitTests/Sagas/DispatchToSagasTests.cs @@ -91,6 +91,23 @@ public async Task SagaUpdaterIsInvokedCorrectly() Times.Exactly(domainEventCount)); } + [Test] + public async Task SagaStoreReceivesEventIdAsSourceId() + { + // Arrange + var sagaMock = Arrange_Woking_SagaStore(SagaState.Running); + var domainEvent = ADomainEvent(); + + // Act + await Sut.ProcessAsync(new[] { domainEvent }, CancellationToken.None).ConfigureAwait(false); + + // Assert + _sagaStoreMock.Verify(a => a.UpdateAsync(It.IsAny(), It.IsAny(), + domainEvent.Metadata.EventId, + It.IsAny>(), + It.IsAny())); + } + [Test] public async Task SagaErrorHandlerIsInvokedCorrectly() { From 6cbdfa5f4f135dcabd68f5e9b34628f80927c993 Mon Sep 17 00:00:00 2001 From: Dure Sameen Date: Sat, 30 Mar 2019 23:50:35 +0500 Subject: [PATCH 15/27] updated readme with external example link and description --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f478368b3..552ccee93 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ the [do’s and don’ts](http://docs.geteventflow.net/DosAndDonts.html) and the * **Async/await first:** Every part of EventFlow is written using async/await. * **Highly configurable and extendable** * **Easy to use** -* **No use of threads or background workers making it "web friendly"** +* **No use of threads or background workers** * **Cancellation:** All methods that does IO work or might delay execution (due to retries), takes a `CancellationToken` argument to allow you to cancel the operation @@ -67,10 +67,18 @@ the [do’s and don’ts](http://docs.geteventflow.net/DosAndDonts.html) and the [complete example](#complete-example). It features entities, a read model for an entity, delete on read models, specifications and snapshots. + * **[.NET Core:](https://github.com/johnny-chan/EventFlowDemo)** + A Web API running .NET Core 2.2 using the event flow. It uses the pre-defined + command/entities/events from the [complete example](#complete-example). There are endpoints to + create a new example event, getting a data model and to replay all data models. + +* **[ElasticSearch/.NET Core:](https://github.com/DureSameen/EventFlowWithElasticSearch)** + Two Web APIs running .NET Core 2.1 using the event flow. It is configured with EventFlow, ElasticSearch, EventStore and RabbitMq. The branch "withRabbitMq" is configured a RabbitMq subscriber which listen/invoke "Domain Event Subscribers" and insert incoming data to ElasticSearch. + ### Overview Here is a list of the EventFlow concepts. Use the links to navigate -to the documentation. +to the documentatin. * [**Aggregates:**](http://docs.geteventflow.net/Aggregates.html) Domains object that guarantees the consistency of changes being made within From b280edd0fddc9cd622ce78d01256e9d18c14bd1f Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Mon, 1 Apr 2019 11:24:44 +0200 Subject: [PATCH 16/27] Test for index fragmentation --- .../Extensions/MsSqlDatabaseExtensions.cs | 20 +++ .../EventStores/MsSqlEventStoreTests.cs | 1 - .../IdentityIndexFragmentationTests.cs | 114 ++++++++++++++++++ .../MsSql/MsSqlConnectionString.cs | 1 + 4 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 Source/EventFlow.MsSql.Tests/Extensions/MsSqlDatabaseExtensions.cs create mode 100644 Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs diff --git a/Source/EventFlow.MsSql.Tests/Extensions/MsSqlDatabaseExtensions.cs b/Source/EventFlow.MsSql.Tests/Extensions/MsSqlDatabaseExtensions.cs new file mode 100644 index 000000000..24a224235 --- /dev/null +++ b/Source/EventFlow.MsSql.Tests/Extensions/MsSqlDatabaseExtensions.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using System.Linq; +using Dapper; +using EventFlow.TestHelpers.MsSql; + +namespace EventFlow.MsSql.Tests.Extensions +{ + public static class MsSqlDatabaseExtensions + { + public static IReadOnlyCollection Query(this IMsSqlDatabase database, string sql) + { + return database.WithConnection>(c => c.Query(sql).ToList()); + } + + public static int Execute(this IMsSqlDatabase database, string sql, object param) + { + return database.WithConnection(c => c.Execute(sql, param)); + } + } +} diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/EventStores/MsSqlEventStoreTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/EventStores/MsSqlEventStoreTests.cs index 4be7bc1b7..b6a8db53e 100644 --- a/Source/EventFlow.MsSql.Tests/IntegrationTests/EventStores/MsSqlEventStoreTests.cs +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/EventStores/MsSqlEventStoreTests.cs @@ -21,7 +21,6 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -using System.Threading.Tasks; using EventFlow.Configuration; using EventFlow.Extensions; using EventFlow.MsSql.EventStores; diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs new file mode 100644 index 000000000..f5f6616ab --- /dev/null +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs @@ -0,0 +1,114 @@ +using System; +using System.Linq; +using EventFlow.Core; +using EventFlow.Extensions; +using EventFlow.MsSql.Tests.Extensions; +using EventFlow.TestHelpers; +using EventFlow.TestHelpers.MsSql; +using FluentAssertions; +using Newtonsoft.Json; +using NUnit.Framework; + +// ReSharper disable StringLiteralTypo + +namespace EventFlow.MsSql.Tests.IntegrationTests +{ + [Category(Categories.Integration)] + public class IdentityIndexFragmentationTests : Test + { + private IMsSqlDatabase _testDatabase; + + private class MagicId : Identity + { + public MagicId(string value) : base(value) + { + } + } + + [Test] + public void VerifyThereLittleFragmentation() + { + // Arrange + var ids = Enumerable.Range(0, 1000) + .Select(_ => MagicId.NewComb().Value) + .ToList(); + + // Act + foreach (var id in ids) + { + _testDatabase.Execute("INSERT INTO IndexFragmentation (Id) VALUES (@Id)", new {Id = id}); + } + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentation"); + fragmentation.Should().BeLessThan(1); + } + + private double GetIndexFragmentation(string table) + { + const string sql = @" + SELECT dbschemas.[name] as 'schema', + dbtables.[name] as 'table', + dbindexes.[name] as 'index', + indexstats.avg_fragmentation_in_percent AS 'fragmentation', + indexstats.page_count AS 'pageCount', + index_level AS 'level' + FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, 'DETAILED') AS indexstats + INNER JOIN sys.tables dbtables on dbtables.[object_id] = indexstats.[object_id] + INNER JOIN sys.schemas dbschemas on dbtables.[schema_id] = dbschemas.[schema_id] + INNER JOIN sys.indexes AS dbindexes ON dbindexes.[object_id] = indexstats.[object_id] + AND indexstats.index_id = dbindexes.index_id + WHERE indexstats.database_id = DB_ID() + ORDER BY dbschemas.[name],dbtables.[name],dbindexes.[name],index_level desc + "; + + var rows = _testDatabase.Query(sql) + .Where(r => string.Equals(table, r.Table, StringComparison.OrdinalIgnoreCase)) + .OrderBy(r => r.Level) + .ToList(); + + return rows.First().Fragmentation; + } + + [SetUp] + public void SetUp() + { + _testDatabase = MsSqlHelpz.CreateDatabase("index_fragmentation"); + _testDatabase.Execute("CREATE TABLE IndexFragmentation (Id nvarchar(250) PRIMARY KEY)"); + } + + [TearDown] + public void TearDown() + { + _testDatabase.DisposeSafe("DROP test database"); + } + + private class IndexFragmentationDetails + { + public IndexFragmentationDetails( + string schema, + string table, + string index, + double fragmentation, + long pageCount, + byte level) + { + Schema = schema; + Table = table; + Index = index; + Fragmentation = fragmentation; + PageCount = pageCount; + Level = level; + } + + public string Schema { get; } + public string Table { get; } + public string Index { get; } + + public double Fragmentation { get; } + public long PageCount { get; } + + public byte Level { get; } + } + } +} diff --git a/Source/EventFlow.TestHelpers/MsSql/MsSqlConnectionString.cs b/Source/EventFlow.TestHelpers/MsSql/MsSqlConnectionString.cs index d3c3ca628..aec961ca1 100644 --- a/Source/EventFlow.TestHelpers/MsSql/MsSqlConnectionString.cs +++ b/Source/EventFlow.TestHelpers/MsSql/MsSqlConnectionString.cs @@ -73,6 +73,7 @@ public void Execute(string sql) } }); } + public void WithConnection(Action action) { WithConnection(c => From 4df930c46ec816278d702139e90f5b515ec8d96d Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Mon, 1 Apr 2019 12:06:08 +0200 Subject: [PATCH 17/27] PoC some sanity tests, needs cleanup and verification --- .../IdentityIndexFragmentationTests.cs | 84 ++++++++++++++++--- 1 file changed, 72 insertions(+), 12 deletions(-) diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs index f5f6616ab..e2b94b109 100644 --- a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs @@ -6,7 +6,6 @@ using EventFlow.TestHelpers; using EventFlow.TestHelpers.MsSql; using FluentAssertions; -using Newtonsoft.Json; using NUnit.Framework; // ReSharper disable StringLiteralTypo @@ -16,6 +15,7 @@ namespace EventFlow.MsSql.Tests.IntegrationTests [Category(Categories.Integration)] public class IdentityIndexFragmentationTests : Test { + private const int ROWS = 10000; private IMsSqlDatabase _testDatabase; private class MagicId : Identity @@ -26,22 +26,81 @@ public MagicId(string value) : base(value) } [Test] - public void VerifyThereLittleFragmentation() + public void VerifyThereLittleFragmentationUsingString() { - // Arrange - var ids = Enumerable.Range(0, 1000) - .Select(_ => MagicId.NewComb().Value) - .ToList(); + // Act + InsertRows(() => MagicId.NewComb().Value, ROWS, "IndexFragmentationString"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationString"); + fragmentation.Should().BeLessThan(10); + } + + [Test] + public void VerifyThereLittleFragmentationUsingGuid() + { + // Act + InsertRows(() => MagicId.NewComb().GetGuid(), ROWS, "IndexFragmentationGuid"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationGuid"); + fragmentation.Should().BeLessThan(10); + } + + [Test] + public void SanityCombYieldsLowFragmentationStoredInGuid() + { + // Act + InsertRows(GuidFactories.Comb.Create, ROWS, "IndexFragmentationGuid"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationGuid"); + fragmentation.Should().BeLessThan(10); + } + + [Test] + public void SanityCombYieldsLowFragmentationStoredInString() + { + // Act + InsertRows(() => GuidFactories.Comb.Create().ToString("N"), ROWS, "IndexFragmentationString"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationString"); + fragmentation.Should().BeLessThan(10); + } + + [Test] + public void SanityGuidIdentityYieldsHighFragmentationStoredInString() + { + // Act + InsertRows(() => MagicId.New.Value, ROWS, "IndexFragmentationString"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationString"); + fragmentation.Should().BeGreaterThan(30); // closer to 100 in reality + } + [Test] + public void SanityGuidIdentityYieldsHighFragmentationStoredInGuid() + { // Act + InsertRows(() => MagicId.New.GetGuid(), ROWS, "IndexFragmentationGuid"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationGuid"); + fragmentation.Should().BeGreaterThan(30); // closer to 100 in reality + } + + public void InsertRows(Func generator, int count, string table) + { + var ids = Enumerable.Range(0, count) + .Select(_ => generator()) + .ToList(); + foreach (var id in ids) { - _testDatabase.Execute("INSERT INTO IndexFragmentation (Id) VALUES (@Id)", new {Id = id}); + _testDatabase.Execute($"INSERT INTO {table} (Id) VALUES (@Id)", new { Id = id }); } - - // Assert - var fragmentation = GetIndexFragmentation("IndexFragmentation"); - fragmentation.Should().BeLessThan(1); } private double GetIndexFragmentation(string table) @@ -74,7 +133,8 @@ FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, 'DETAILED') AS i public void SetUp() { _testDatabase = MsSqlHelpz.CreateDatabase("index_fragmentation"); - _testDatabase.Execute("CREATE TABLE IndexFragmentation (Id nvarchar(250) PRIMARY KEY)"); + _testDatabase.Execute("CREATE TABLE IndexFragmentationString (Id nvarchar(250) PRIMARY KEY)"); + _testDatabase.Execute("CREATE TABLE IndexFragmentationGuid (Id uniqueidentifier PRIMARY KEY)"); } [TearDown] From b5822c5a1ac6a9d59d04b4363f1e58bb26b91659 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Mon, 1 Apr 2019 12:16:43 +0200 Subject: [PATCH 18/27] Add another sanity test --- .../IdentityIndexFragmentationTests.cs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs index e2b94b109..44c5d4cdd 100644 --- a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Threading; using EventFlow.Core; using EventFlow.Extensions; using EventFlow.MsSql.Tests.Extensions; @@ -47,6 +48,27 @@ public void VerifyThereLittleFragmentationUsingGuid() fragmentation.Should().BeLessThan(10); } + [Test] + public void SanityIntLowFragmentationStoredInGuid() + { + // Arrange + var i = 0; + + // Act + InsertRows(() => + { + Interlocked.Increment(ref i); + return $"{i,5}"; + }, + ROWS, + "IndexFragmentationString"); + + // Assert + var fragmentation = GetIndexFragmentation("IndexFragmentationString"); + fragmentation.Should().BeLessThan(10); + } + + [Test] public void SanityCombYieldsLowFragmentationStoredInGuid() { From 962cec9870beef5e0d0428459a8bb1f14648570d Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Mon, 1 Apr 2019 13:42:34 +0200 Subject: [PATCH 19/27] Fix COMB generation --- .../IdentityIndexFragmentationTests.cs | 4 +-- Source/EventFlow/Core/GuidFactories.cs | 36 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs index 44c5d4cdd..394314e28 100644 --- a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs @@ -27,7 +27,7 @@ public MagicId(string value) : base(value) } [Test] - public void VerifyThereLittleFragmentationUsingString() + public void VerifyIdentityHasThereLittleFragmentationUsingString() { // Act InsertRows(() => MagicId.NewComb().Value, ROWS, "IndexFragmentationString"); @@ -38,7 +38,7 @@ public void VerifyThereLittleFragmentationUsingString() } [Test] - public void VerifyThereLittleFragmentationUsingGuid() + public void VerifyIdentityHasLittleFragmentationUsingGuid() { // Act InsertRows(() => MagicId.NewComb().GetGuid(), ROWS, "IndexFragmentationGuid"); diff --git a/Source/EventFlow/Core/GuidFactories.cs b/Source/EventFlow/Core/GuidFactories.cs index d90b8c83c..490220cd2 100644 --- a/Source/EventFlow/Core/GuidFactories.cs +++ b/Source/EventFlow/Core/GuidFactories.cs @@ -24,33 +24,33 @@ using System; using System.Security.Cryptography; using System.Text; +using System.Threading; namespace EventFlow.Core { public static class GuidFactories { - /// - /// Creates a sequential Guid that can be used to avoid database fragmentation - /// http://stackoverflow.com/a/2187898 - /// public static class Comb { + private static int _counter; + + private static long GetTicks() + { + var i = Interlocked.Increment(ref _counter); + return DateTime.UtcNow.Ticks + i; + } + public static Guid Create() { - var destinationArray = Guid.NewGuid().ToByteArray(); - var time = new DateTime(0x76c, 1, 1); - var now = DateTime.Now; - var span = new TimeSpan(now.Ticks - time.Ticks); - var timeOfDay = now.TimeOfDay; - var bytes = BitConverter.GetBytes(span.Days); - var array = BitConverter.GetBytes((long)(timeOfDay.TotalMilliseconds / 3.333333)); - - Array.Reverse(bytes); - Array.Reverse(array); - Array.Copy(bytes, bytes.Length - 2, destinationArray, destinationArray.Length - 6, 2); - Array.Copy(array, array.Length - 4, destinationArray, destinationArray.Length - 4, 4); - - return new Guid(destinationArray); + var uid = Guid.NewGuid().ToByteArray(); + var binDate = BitConverter.GetBytes(GetTicks()); + + return new Guid( + new[] + { + uid[0], uid[1], uid[2], uid[3], uid[4], uid[5], uid[6], (byte)(0xc0 | (0xf & uid[7])), + binDate[1], binDate[0], binDate[7], binDate[6], binDate[5], binDate[4], binDate[3], binDate[2] + }); } } From 07456ca5282b44491f9bdcf9ad2078f9b37eff3d Mon Sep 17 00:00:00 2001 From: Dure Sameen Date: Wed, 3 Apr 2019 11:51:12 +0500 Subject: [PATCH 20/27] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7efdd2422..b22b4c95a 100644 --- a/README.md +++ b/README.md @@ -71,14 +71,14 @@ the [do’s and don’ts](http://docs.geteventflow.net/DosAndDonts.html) and the A Web API running .NET Core 2.2 using the event flow. It uses the pre-defined command/entities/events from the [complete example](#complete-example). There are endpoints to create a new example event, getting a data model and to replay all data models. - + * **[ElasticSearch/.NET Core:](https://github.com/DureSameen/EventFlowWithElasticSearch)** - Two Web APIs running .NET Core 2.1 using the event flow. It is configured with EventFlow, ElasticSearch, EventStore and RabbitMq. The branch "withRabbitMq" is configured a RabbitMq subscriber which listen/invoke "Domain Event Subscribers" and insert incoming data to ElasticSearch. + It is configured with EventFlow, ElasticSearch, EventStore and RabbitMq. See "withRabbitMq" branch for #384. ### Overview Here is a list of the EventFlow concepts. Use the links to navigate -to the documentatin. +to the documentation. * [**Aggregates:**](http://docs.geteventflow.net/Aggregates.html) Domains object that guarantees the consistency of changes being made within From e4cbcc99c91f014ed738707ae85818f668d86ccb Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Sat, 6 Apr 2019 15:05:26 +0200 Subject: [PATCH 21/27] feat: SourceLink support --- Source/Common.props | 8 ++++++-- Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj | 4 ++++ Source/EventFlow.Autofac/EventFlow.Autofac.csproj | 6 ++++++ .../EventFlow.DependencyInjection.csproj | 4 ++++ .../EventFlow.Elasticsearch.csproj | 4 ++++ .../EventFlow.EntityFramework.csproj | 6 ++++++ .../EventFlow.EventStores.EventStore.csproj | 6 ++++++ Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj | 4 ++++ Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj | 4 ++++ Source/EventFlow.MsSql/EventFlow.MsSql.csproj | 4 ++++ Source/EventFlow.Owin/EventFlow.Owin.csproj | 4 ++++ Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj | 4 ++++ Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj | 4 ++++ Source/EventFlow.SQLite/EventFlow.SQLite.csproj | 4 ++++ Source/EventFlow.Sql/EventFlow.Sql.csproj | 4 ++++ Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj | 4 ++++ Source/EventFlow/EventFlow.csproj | 4 ++++ build.cake | 2 +- build.ps1 | 4 ++-- 19 files changed, 79 insertions(+), 5 deletions(-) diff --git a/Source/Common.props b/Source/Common.props index e6a94a075..453362dcb 100644 --- a/Source/Common.props +++ b/Source/Common.props @@ -1,6 +1,10 @@ - embedded - True + embedded + True + true + true + true + snupkg \ No newline at end of file diff --git a/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj b/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj index 751cdd446..f8d9f677b 100644 --- a/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj +++ b/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj @@ -24,6 +24,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj index 3352b8798..cd153f1ce 100644 --- a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj +++ b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj @@ -29,6 +29,12 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj b/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj index 4402474be..51e804364 100644 --- a/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj +++ b/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj @@ -24,6 +24,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj index d69e53755..1baf26b8e 100644 --- a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj +++ b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj @@ -24,6 +24,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj b/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj index 6d871c7b3..2222f1f73 100644 --- a/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj +++ b/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj @@ -25,6 +25,12 @@ 2.1.0 + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj b/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj index b04ba887e..060c1b8b1 100644 --- a/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj +++ b/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj @@ -29,6 +29,12 @@ + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj index 0967e489c..331daa8bf 100644 --- a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj +++ b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj @@ -25,6 +25,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj index 67d7d5e83..7d80b21b7 100644 --- a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj +++ b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj @@ -24,6 +24,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj index 36f80af09..9f5ad1dce 100644 --- a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj +++ b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj @@ -25,6 +25,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.Owin/EventFlow.Owin.csproj b/Source/EventFlow.Owin/EventFlow.Owin.csproj index 51634d60b..04ec7d24e 100644 --- a/Source/EventFlow.Owin/EventFlow.Owin.csproj +++ b/Source/EventFlow.Owin/EventFlow.Owin.csproj @@ -25,6 +25,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj index e2cbad495..90884691e 100644 --- a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj +++ b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj @@ -38,6 +38,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj index ee6a8225c..0579a7e45 100644 --- a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj +++ b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj @@ -27,6 +27,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + \ No newline at end of file diff --git a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj index f18c757f3..c113d4cb9 100644 --- a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj +++ b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj @@ -25,6 +25,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.Sql/EventFlow.Sql.csproj b/Source/EventFlow.Sql/EventFlow.Sql.csproj index d0d383048..0936755b7 100644 --- a/Source/EventFlow.Sql/EventFlow.Sql.csproj +++ b/Source/EventFlow.Sql/EventFlow.Sql.csproj @@ -26,6 +26,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index e315b4299..f740335ae 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -27,6 +27,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Source/EventFlow/EventFlow.csproj b/Source/EventFlow/EventFlow.csproj index 9c1be1928..7320f3eff 100644 --- a/Source/EventFlow/EventFlow.csproj +++ b/Source/EventFlow/EventFlow.csproj @@ -27,6 +27,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + All diff --git a/build.cake b/build.cake index 0e77ff1a2..5e8da2f34 100644 --- a/build.cake +++ b/build.cake @@ -325,7 +325,7 @@ void ExecuteTest(string files, string resultsFile) { ArgumentCustomization = aggs => aggs.Append("-returntargetcode"), OldStyle = true, - MergeOutput = true + MergeOutput = true } .WithFilter("+[EventFlow*]*") .WithFilter("-[*Tests]*") diff --git a/build.ps1 b/build.ps1 index 265bd1238..e53d2a288 100644 --- a/build.ps1 +++ b/build.ps1 @@ -85,7 +85,7 @@ function GetProxyEnabledWebClient { $wc = New-Object System.Net.WebClient $proxy = [System.Net.WebRequest]::GetSystemWebProxy() - $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials + $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials $wc.Proxy = $proxy return $wc } @@ -115,7 +115,7 @@ if ((Test-Path $PSScriptRoot) -and !(Test-Path $TOOLS_DIR)) { # Make sure that packages.config exist. if (!(Test-Path $PACKAGES_CONFIG)) { - Write-Verbose -Message "Downloading packages.config..." + Write-Verbose -Message "Downloading packages.config..." try { $wc = GetProxyEnabledWebClient $wc.DownloadFile("https://cakebuild.net/download/bootstrapper/packages", $PACKAGES_CONFIG) } catch { From dc4971686cbcfe24ba6d812aae4c5f528a1a618e Mon Sep 17 00:00:00 2001 From: David Rouyer Date: Mon, 8 Apr 2019 21:37:35 +0200 Subject: [PATCH 22/27] chore: address feedback --- Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj | 5 +---- Source/EventFlow.Autofac/EventFlow.Autofac.csproj | 5 +---- .../EventFlow.DependencyInjection.csproj | 5 +---- .../EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj | 5 +---- .../EventFlow.EntityFramework.csproj | 5 +---- .../EventFlow.EventStores.EventStore.csproj | 5 +---- Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj | 7 ++----- Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj | 5 +---- Source/EventFlow.MsSql/EventFlow.MsSql.csproj | 5 +---- Source/EventFlow.Owin/EventFlow.Owin.csproj | 5 +---- Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj | 5 +---- Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj | 5 +---- Source/EventFlow.SQLite/EventFlow.SQLite.csproj | 5 +---- Source/EventFlow.Sql/EventFlow.Sql.csproj | 5 +---- Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj | 5 +---- Source/EventFlow/EventFlow.csproj | 5 +---- 16 files changed, 17 insertions(+), 65 deletions(-) diff --git a/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj b/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj index f8d9f677b..167a69879 100644 --- a/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj +++ b/Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj @@ -24,10 +24,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj index cd153f1ce..d0cdd87a1 100644 --- a/Source/EventFlow.Autofac/EventFlow.Autofac.csproj +++ b/Source/EventFlow.Autofac/EventFlow.Autofac.csproj @@ -30,10 +30,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj b/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj index 51e804364..f02d9fbb0 100644 --- a/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj +++ b/Source/EventFlow.DependencyInjection/EventFlow.DependencyInjection.csproj @@ -24,10 +24,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj index 1baf26b8e..2c6155a3c 100644 --- a/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj +++ b/Source/EventFlow.Elasticsearch/EventFlow.Elasticsearch.csproj @@ -24,10 +24,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj b/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj index 2222f1f73..288f6e353 100644 --- a/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj +++ b/Source/EventFlow.EntityFramework/EventFlow.EntityFramework.csproj @@ -26,10 +26,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj b/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj index 060c1b8b1..c8dd0aaf4 100644 --- a/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj +++ b/Source/EventFlow.EventStores.EventStore/EventFlow.EventStores.EventStore.csproj @@ -30,10 +30,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj index 331daa8bf..64c83a387 100644 --- a/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj +++ b/Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj @@ -25,11 +25,8 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + diff --git a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj index 7d80b21b7..7360bd74c 100644 --- a/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj +++ b/Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj @@ -24,10 +24,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj index 9f5ad1dce..e1d82cbd9 100644 --- a/Source/EventFlow.MsSql/EventFlow.MsSql.csproj +++ b/Source/EventFlow.MsSql/EventFlow.MsSql.csproj @@ -25,10 +25,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.Owin/EventFlow.Owin.csproj b/Source/EventFlow.Owin/EventFlow.Owin.csproj index 04ec7d24e..e705b7458 100644 --- a/Source/EventFlow.Owin/EventFlow.Owin.csproj +++ b/Source/EventFlow.Owin/EventFlow.Owin.csproj @@ -25,10 +25,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj index 90884691e..aa11a40d7 100644 --- a/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj +++ b/Source/EventFlow.PostgreSql/EventFlow.PostgreSql.csproj @@ -38,10 +38,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj index 0579a7e45..acd41f673 100644 --- a/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj +++ b/Source/EventFlow.RabbitMQ/EventFlow.RabbitMQ.csproj @@ -27,10 +27,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + \ No newline at end of file diff --git a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj index c113d4cb9..7f6a24516 100644 --- a/Source/EventFlow.SQLite/EventFlow.SQLite.csproj +++ b/Source/EventFlow.SQLite/EventFlow.SQLite.csproj @@ -25,10 +25,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.Sql/EventFlow.Sql.csproj b/Source/EventFlow.Sql/EventFlow.Sql.csproj index 0936755b7..a47035bb5 100644 --- a/Source/EventFlow.Sql/EventFlow.Sql.csproj +++ b/Source/EventFlow.Sql/EventFlow.Sql.csproj @@ -26,10 +26,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj index f740335ae..ad3c8bf8c 100644 --- a/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj +++ b/Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj @@ -27,10 +27,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/Source/EventFlow/EventFlow.csproj b/Source/EventFlow/EventFlow.csproj index 7320f3eff..6d01e8b85 100644 --- a/Source/EventFlow/EventFlow.csproj +++ b/Source/EventFlow/EventFlow.csproj @@ -27,10 +27,7 @@ - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - + All From 1e966d246c90edc67fc8bc328fe7f4306b00e773 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 10 Apr 2019 20:07:55 +0200 Subject: [PATCH 23/27] Cleanup of README --- RELEASE_NOTES.md | 50 +++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index d9a723698..7d1ca29a2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,37 +1,23 @@ ### New in 0.70 (not released yet) -* Breaking: Changed target framework for: - - `EventFlow`, - - `EventFlow.Tests`, - - `EventFlow.TestHelpers`, - - `EventFlow.AspNetCore.Tests`, - - `EventFlow.Autofac`, - - `EventFlow.Autofac.Tests`, - - `EventFlow.DependencyInjection.Tests`, - - `EventFlow.Elasticsearch`, - - `EventFlow.Elasticsearch.Tests`, - - `EventFlow.EntityFramework.Tests`, - - `EventFlow.Examples.Shipping`, - - `EventFlow.Examples.Shipping.Tests`, - - `EventFlow.Examples.Shipping.Queries.InMemory`, - - `EventFlow.Hangfire`, - - `EventFlow.Hangfire.Tests`, - - `EventFlow.MongoDB`, - - `EventFlow.MsSql`, - - `EventFlow.MsSql.Tests`, - - `EventFlow.Owin`, - - `EventFlow.Owin.Tests`, - - `EventFlow.PostgreSql`, - - `EventFlow.PostgreSql.Tests`, - - `EventFlow.RabbitMQ`, - - `EventFlow.RabbitMQ.Tests` - - `EventFlow.Sql`, - - `EventFlow.Sql.Tests`, - - `EventFlow.SQLite`, - - `EventFlow.SQLite.Tests` - - to .NET 4.5.2 as required by `AutoFixture.AutoMoq` NuGet dependency and to align packages on the - [latest supported release](https://github.com/Microsoft/dotnet/blob/master/releases/README.md). +* Breaking: Changed target framework to to .NET Framework 4.5.2 for the following NuGet packages, + as Microsoft has [discontinued](https://github.com/Microsoft/dotnet/blob/master/releases/README.md) + support for .NET Framework 4.5.1 + - `EventFlow` + - `EventFlow.TestHelpers` + - `EventFlow.Autofac` + - `EventFlow.Elasticsearch` + - `EventFlow.Examples.Shipping` + - `EventFlow.Examples.Shipping.Queries.InMemory` + - `EventFlow.Hangfire` + - `EventFlow.MongoDB` + - `EventFlow.MsSql` + - `EventFlow.Owin` + - `EventFlow.PostgreSql` + - `EventFlow.RabbitMQ` + - `EventFlow.Sql` + - `EventFlow.SQLite` +* New: Added [SourceLink](https://github.com/dotnet/sourcelink) support ### New in 0.69.3772 (released 2019-02-12) From d488e53c8f5c75b11c70ea009ef16e128adac701 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 10 Apr 2019 20:31:53 +0200 Subject: [PATCH 24/27] Make identity better at generating string friendly GUIDs --- .../IdentityIndexFragmentationTests.cs | 29 ++++++++++++----- Source/EventFlow/Core/GuidFactories.cs | 31 +++++++++++++++++-- Source/EventFlow/Core/Identity.cs | 2 +- 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs index 394314e28..bb44eabf7 100644 --- a/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs +++ b/Source/EventFlow.MsSql.Tests/IntegrationTests/IdentityIndexFragmentationTests.cs @@ -37,19 +37,29 @@ public void VerifyIdentityHasThereLittleFragmentationUsingString() fragmentation.Should().BeLessThan(10); } + [Test] - public void VerifyIdentityHasLittleFragmentationUsingGuid() + public void SanityIntLowFragmentationStoredInGuid() { + // Arrange + var i = 0; + // Act - InsertRows(() => MagicId.NewComb().GetGuid(), ROWS, "IndexFragmentationGuid"); + InsertRows(() => + { + Interlocked.Increment(ref i); + return $"{i,5}"; + }, + ROWS, + "IndexFragmentationString"); // Assert - var fragmentation = GetIndexFragmentation("IndexFragmentationGuid"); + var fragmentation = GetIndexFragmentation("IndexFragmentationString"); fragmentation.Should().BeLessThan(10); } [Test] - public void SanityIntLowFragmentationStoredInGuid() + public void SanityIntAsHexLowFragmentationStoredInGuid() { // Arrange var i = 0; @@ -58,7 +68,7 @@ public void SanityIntLowFragmentationStoredInGuid() InsertRows(() => { Interlocked.Increment(ref i); - return $"{i,5}"; + return $"{i,5:X}"; }, ROWS, "IndexFragmentationString"); @@ -81,14 +91,14 @@ public void SanityCombYieldsLowFragmentationStoredInGuid() } [Test] - public void SanityCombYieldsLowFragmentationStoredInString() + public void SanityCombYieldsHighFragmentationStoredInString() { // Act InsertRows(() => GuidFactories.Comb.Create().ToString("N"), ROWS, "IndexFragmentationString"); // Assert var fragmentation = GetIndexFragmentation("IndexFragmentationString"); - fragmentation.Should().BeLessThan(10); + fragmentation.Should().BeGreaterThan(90); } [Test] @@ -119,6 +129,11 @@ public void InsertRows(Func generator, int count, string table) .Select(_ => generator()) .ToList(); + foreach (var id in ids.Take(20)) + { + Console.WriteLine(id); + } + foreach (var id in ids) { _testDatabase.Execute($"INSERT INTO {table} (Id) VALUES (@Id)", new { Id = id }); diff --git a/Source/EventFlow/Core/GuidFactories.cs b/Source/EventFlow/Core/GuidFactories.cs index 490220cd2..336da66d2 100644 --- a/Source/EventFlow/Core/GuidFactories.cs +++ b/Source/EventFlow/Core/GuidFactories.cs @@ -48,8 +48,35 @@ public static Guid Create() return new Guid( new[] { - uid[0], uid[1], uid[2], uid[3], uid[4], uid[5], uid[6], (byte)(0xc0 | (0xf & uid[7])), - binDate[1], binDate[0], binDate[7], binDate[6], binDate[5], binDate[4], binDate[3], binDate[2] + uid[0], uid[1], uid[2], uid[3], + uid[4], uid[5], + uid[6], (byte)(0xc0 | (0xf & uid[7])), + binDate[1], binDate[0], + binDate[7], binDate[6], binDate[5], binDate[4], binDate[3], binDate[2] + }); + } + + public static Guid CreateForString() + { + /* + From: https://docs.microsoft.com/en-us/dotnet/api/system.guid.tobytearray + Note that the order of bytes in the returned byte array is different from the string + representation of a Guid value. The order of the beginning four-byte group and the + next two two-byte groups is reversed, whereas the order of the last two-byte group + and the closing six-byte group is the same. + */ + + var uid = Guid.NewGuid().ToByteArray(); + var binDate = BitConverter.GetBytes(GetTicks()); + + return new Guid( + new[] + { + binDate[0], binDate[1], binDate[2], binDate[3], + binDate[4], binDate[5], + binDate[6], binDate[7], + uid[0], uid[1], + uid[2], uid[3], uid[4], uid[5], uid[6], (byte)(0xc0 | (0xf & uid[7])), }); } } diff --git a/Source/EventFlow/Core/Identity.cs b/Source/EventFlow/Core/Identity.cs index bfd2ec239..808823860 100644 --- a/Source/EventFlow/Core/Identity.cs +++ b/Source/EventFlow/Core/Identity.cs @@ -64,7 +64,7 @@ public static T NewDeterministic(Guid namespaceId, byte[] nameBytes) public static T NewComb() { - var guid = GuidFactories.Comb.Create(); + var guid = GuidFactories.Comb.CreateForString(); return With(guid); } From 56d38c498d505f5bcdebdd50308b3bed4bf990f4 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 10 Apr 2019 20:34:40 +0200 Subject: [PATCH 25/27] Updated release notes --- RELEASE_NOTES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7d1ca29a2..efb4c76cc 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -18,6 +18,8 @@ - `EventFlow.Sql` - `EventFlow.SQLite` * New: Added [SourceLink](https://github.com/dotnet/sourcelink) support +* Fix: `Identity.NewComb()` now produces string values that doesn't cause + too much index fragmentation in MSSQL string columns ### New in 0.69.3772 (released 2019-02-12) From 2ecf3b76abba61cdf78f3ac586b962f022ba4c0f Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 10 Apr 2019 20:40:53 +0200 Subject: [PATCH 26/27] Added some documentation --- Source/EventFlow/Core/GuidFactories.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Source/EventFlow/Core/GuidFactories.cs b/Source/EventFlow/Core/GuidFactories.cs index 336da66d2..b5f265434 100644 --- a/Source/EventFlow/Core/GuidFactories.cs +++ b/Source/EventFlow/Core/GuidFactories.cs @@ -40,6 +40,17 @@ private static long GetTicks() return DateTime.UtcNow.Ticks + i; } + /// + /// Generates a GUID values that causes less index fragmentation when stored + /// in e.g. uniqueidentifier columns in MSSQL. + /// + /// + /// 2825c1d8-4587-cc55-08c1-08d6bde2765b + /// 901337ba-c64b-c6d4-08c2-08d6bde2765b + /// 45d57ba2-acc5-ce80-08c3-08d6bde2765b + /// 36528acf-352a-c28c-08c4-08d6bde2765b + /// 6fc88b5e-3782-c8fd-08c5-08d6bde2765b + /// public static Guid Create() { var uid = Guid.NewGuid().ToByteArray(); @@ -56,6 +67,17 @@ public static Guid Create() }); } + /// + /// Generates a GUID values that causes less index fragmentation when stored + /// in e.g. nvarchar(n) columns in MSSQL. + /// + /// + /// 899ee1b9-bde2-08d6-20d8-b7e20375c7c9 + /// 899f09b9-bde2-08d6-fd1c-5ec8f3349bcf + /// 899f09ba-bde2-08d6-1521-51d781607ac4 + /// 899f09bb-bde2-08d6-7e6a-fe84f5237dc4 + /// 899f09bc-bde2-08d6-c2f0-276123e06fcf + /// public static Guid CreateForString() { /* From 9bb492a9755dddcb32220d990e0c830fff1e9946 Mon Sep 17 00:00:00 2001 From: Rasmus Mikkelsen Date: Wed, 10 Apr 2019 20:45:33 +0200 Subject: [PATCH 27/27] Minor cleanup --- RELEASE_NOTES.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ccf3a582d..35bddde9a 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -18,11 +18,9 @@ - `EventFlow.Sql` - `EventFlow.SQLite` * New: Added [SourceLink](https://github.com/dotnet/sourcelink) support - - * Fix: `DispatchToSagas.ProcessSagaAsync` use `EventId` instead of `SourceId` as `SourceId` +* Fix: `DispatchToSagas.ProcessSagaAsync` use `EventId` instead of `SourceId` as `SourceId` for delivery of external event to AggregateSaga - ### New in 0.69.3772 (released 2019-02-12) * New: Added configuration option to set the "point of no return" when using