├── .gitattributes
├── .gitignore
├── .nuget
├── NuGet.Config
├── NuGet.targets
└── nuget.exe
├── LICENSE.txt
├── README.md
├── docs
├── backlog.md
└── images
│ └── TestSpecificationStatechart.png
├── lib
├── geteventstore_integration.proj
└── packages.config
├── linuxbuild
├── mono-build.proj
├── mono-info.proj
└── mono-version.proj
├── src
├── .nuget
│ └── packages.config
├── Core
│ ├── AggregateSource.Content.ExplicitRouting
│ │ ├── AggregateRootEntity.cs
│ │ ├── AggregateRootEntityTests.cs
│ │ ├── AggregateSource.Content.ExplicitRouting.csproj
│ │ ├── Entity.cs
│ │ ├── EntityTests.cs
│ │ ├── GlobalSuppressions.cs
│ │ ├── Properties
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── Resources.Designer.cs
│ │ │ └── Resources.resx
│ │ └── packages.config
│ ├── AggregateSource.Content.ExplicitStateExplicitRouting
│ │ ├── AggregateRootEntity.cs
│ │ ├── AggregateRootEntityTests.cs
│ │ ├── AggregateSource.Content.ExplicitStateExplicitRouting.csproj
│ │ ├── Entity.cs
│ │ ├── EntityState.cs
│ │ ├── EntityStateTests.cs
│ │ ├── EntityTests.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── packages.config
│ ├── AggregateSource.Tests
│ │ ├── AggregateBuilderTests.cs
│ │ ├── AggregateNotFoundExceptionTests.cs
│ │ ├── AggregateRootEntityStub.cs
│ │ ├── AggregateSource.Tests.csproj
│ │ ├── AggregateSourceExceptionTests.cs
│ │ ├── AggregateStubs.cs
│ │ ├── AggregateTests.cs
│ │ ├── ConcurrentUnitOfWorkTests.cs
│ │ ├── EventRecorderTests.cs
│ │ ├── FactTests.cs
│ │ ├── GlobalSuppressions.cs
│ │ ├── InstanceEventRouterTests.cs
│ │ ├── OptionalTests.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── StaticEventRouterTests.cs
│ │ ├── TestFactBuilder.cs
│ │ ├── UnitOfWorkTests.cs
│ │ └── packages.config
│ ├── AggregateSource.sln
│ ├── AggregateSource.sln.DotSettings
│ └── AggregateSource
│ │ ├── Aggregate.cs
│ │ ├── AggregateBuilder.cs
│ │ ├── AggregateNotFoundException.cs
│ │ ├── AggregateSource.csproj
│ │ ├── AggregateSourceException.cs
│ │ ├── ConcurrentUnitOfWork.cs
│ │ ├── EventRecorder.cs
│ │ ├── Fact.cs
│ │ ├── GlobalSuppressions.cs
│ │ ├── IAggregateChangeTracker.cs
│ │ ├── IAggregateInitializer.cs
│ │ ├── IAggregateRootEntity.cs
│ │ ├── IAsyncRepository.cs
│ │ ├── IConfigureInstanceEventRouter.cs
│ │ ├── IConfigureStaticEventRouter.cs
│ │ ├── IInstanceEventRouter.cs
│ │ ├── IRepository.cs
│ │ ├── ISnapshotable.cs
│ │ ├── IStaticEventRouter.cs
│ │ ├── InstanceEventRouter.cs
│ │ ├── Optional.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ │ ├── README.md
│ │ ├── StaticEventRouter.cs
│ │ └── UnitOfWork.cs
├── EventStore
│ ├── AggregateSource.EventStore.IntegratedTests
│ │ ├── AggregateSource.EventStore.IntegratedTests.csproj
│ │ ├── AsyncRepositoryTests.cs
│ │ ├── Framework
│ │ │ ├── AggregateRootEntityStub.cs
│ │ │ ├── AssemblyAttribute.cs
│ │ │ ├── Catch.cs
│ │ │ ├── EmbeddedEventStore.cs
│ │ │ ├── EventDeserializer.cs
│ │ │ ├── EventReaderConfigurationFactory.cs
│ │ │ ├── EventStoreConnectionExtensions.cs
│ │ │ ├── EventStoreIntegrationAttribute.cs
│ │ │ ├── EventStub.cs
│ │ │ ├── IBinaryDeserializer.cs
│ │ │ ├── IBinarySerializer.cs
│ │ │ ├── RepositoryScenarioBuilder.cs
│ │ │ └── Snapshots
│ │ │ │ ├── AsyncSnapshotReaderFactory.cs
│ │ │ │ ├── SnapshotDeserializer.cs
│ │ │ │ ├── SnapshotReaderConfigurationFactory.cs
│ │ │ │ ├── SnapshotReaderFactory.cs
│ │ │ │ ├── SnapshotStateStub.cs
│ │ │ │ └── SnapshotStreamNameResolver.cs
│ │ ├── Model.cs
│ │ ├── NLog.config
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── RepositoryTests.cs
│ │ ├── Snapshots
│ │ │ ├── AsyncSnapshotReaderTests.cs
│ │ │ ├── AsyncSnapshotableRepositoryTests.cs
│ │ │ ├── Framework
│ │ │ │ └── SnapshotStoreReadConfigurationFactory.cs
│ │ │ ├── SnapshotReaderTests.cs
│ │ │ ├── SnapshotableAggregateRootEntityStub.cs
│ │ │ └── SnapshotableRepositoryTests.cs
│ │ ├── app.config
│ │ └── packages.config
│ ├── AggregateSource.EventStore.Tests
│ │ ├── AggregateSource.EventStore.Tests.csproj
│ │ ├── Builders
│ │ │ ├── EventReaderConfigurationBuilder.cs
│ │ │ ├── SnapshotBuilder.cs
│ │ │ └── SnapshotReaderConfigurationBuilder.cs
│ │ ├── EventReaderConfigurationTests.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resolvers
│ │ │ ├── FixedStreamUserCredentialsResolverTests.cs
│ │ │ ├── NoStreamUserCredentialsResolverTests.cs
│ │ │ └── PassThroughStreamNameResolverTests.cs
│ │ ├── Snapshots
│ │ │ ├── SnapshotReaderConfigurationTests.cs
│ │ │ └── SnapshotTests.cs
│ │ ├── Stubs
│ │ │ ├── StubbedEventDeserializer.cs
│ │ │ ├── StubbedSnapshotDeserializer.cs
│ │ │ ├── StubbedStreamNameResolver.cs
│ │ │ └── StubbedStreamUserCredentialsResolver.cs
│ │ └── packages.config
│ ├── AggregateSource.EventStore.sln
│ ├── AggregateSource.EventStore.sln.DotSettings
│ └── AggregateSource.EventStore
│ │ ├── AggregateSource.EventStore.csproj
│ │ ├── AsyncRepository.cs
│ │ ├── EventReaderConfiguration.cs
│ │ ├── IEventDeserializer.cs
│ │ ├── IStreamNameResolver.cs
│ │ ├── IStreamUserCredentialsResolver.cs
│ │ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ │ ├── Repository.cs
│ │ ├── Resolvers
│ │ ├── FixedStreamUserCredentialsResolver.cs
│ │ ├── NoStreamUserCredentialsResolver.cs
│ │ └── PassThroughStreamNameResolver.cs
│ │ ├── SliceSize.cs
│ │ ├── Snapshots
│ │ ├── AsyncSnapshotReader.cs
│ │ ├── AsyncSnapshotableRepository.cs
│ │ ├── IAsyncSnapshotReader.cs
│ │ ├── ISnapshotDeserializer.cs
│ │ ├── ISnapshotReader.cs
│ │ ├── Snapshot.cs
│ │ ├── SnapshotReader.cs
│ │ ├── SnapshotReaderConfiguration.cs
│ │ └── SnapshotableRepository.cs
│ │ └── packages.config
├── NEventStore
│ ├── .nuget
│ │ └── packages.config
│ ├── AggregateSource.NEventStore.Tests
│ │ ├── AggregateSource.NEventStore.Tests.csproj
│ │ ├── Framework
│ │ │ ├── AggregateRootEntityStub.cs
│ │ │ ├── Catch.cs
│ │ │ ├── EventStub.cs
│ │ │ ├── RepositoryScenarioBuilder.cs
│ │ │ └── Snapshots
│ │ │ │ ├── SnapshotStateStub.cs
│ │ │ │ └── SnapshotableAggregateRootEntityStub.cs
│ │ ├── Model.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── RepositoryTests.cs
│ │ ├── Snapshots
│ │ │ └── SnapshotableRepositoryTests.cs
│ │ └── packages.config
│ ├── AggregateSource.NEventStore.sln
│ ├── AggregateSource.NEventStore.sln.DotSettings
│ └── AggregateSource.NEventStore
│ │ ├── AggregateSource.NEventStore.csproj
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Repository.cs
│ │ ├── Snapshots
│ │ └── SnapshotableRepository.cs
│ │ └── packages.config
├── Reactive
│ ├── AggregateSource.Reactive.Tests
│ │ ├── AggregateSource.Reactive.Tests.csproj
│ │ ├── ObservableAggregateRootEntityTests.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── packages.config
│ ├── AggregateSource.Reactive.sln
│ ├── AggregateSource.Reactive.sln.DotSettings
│ └── AggregateSource.Reactive
│ │ ├── AggregateSource.Reactive.csproj
│ │ ├── IObservableAggregateRootEntity.cs
│ │ ├── ObservableAggregateRootEntity.cs
│ │ └── Properties
│ │ └── AssemblyInfo.cs
├── Recipes
│ └── EventStoreShopping
│ │ ├── EventStoreShopping.sln
│ │ └── EventStoreShopping
│ │ ├── AggregateRootEntity.cs
│ │ ├── App.config
│ │ ├── Entity.cs
│ │ ├── EventStoreShopping.csproj
│ │ ├── Messaging
│ │ ├── Commands
│ │ │ ├── AddItemToCart.cs
│ │ │ ├── Checkout.cs
│ │ │ ├── DecrementItemInCart.cs
│ │ │ ├── IncrementItemInCart.cs
│ │ │ ├── RemoveItemFromCart.cs
│ │ │ └── StartShopping.cs
│ │ └── Events
│ │ │ ├── AddedItemToCart.cs
│ │ │ ├── CheckedoutCart.cs
│ │ │ ├── DecrementedItemCountInCart.cs
│ │ │ ├── IncrementedItemCountInCart.cs
│ │ │ ├── RemovedItemFromCart.cs
│ │ │ └── StartedShopping.cs
│ │ ├── Program.cs
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Shopping
│ │ ├── ItemId.cs
│ │ ├── ShoppingCart.cs
│ │ ├── ShoppingCartAlreadyCheckedOutException.cs
│ │ ├── ShoppingCartDoesNotContainItemException.cs
│ │ └── ShoppingCartId.cs
│ │ └── packages.config
├── SampleSource
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SampleSource.csproj
│ ├── SampleSource.sln
│ ├── Testing
│ │ ├── AggregateAsSystemUnderTest.cs
│ │ └── UsingIdFromIEvent.cs
│ ├── UsingDomainEvents.cs
│ ├── UsingEntities.cs
│ ├── UsingObjectInheritance.cs
│ └── packages.config
├── SharedAssemblyInfo.cs
├── SharedVersionInfo.cs
└── Testing
│ ├── AggregateSource.Testing.NUnit
│ ├── AggregateSource.Testing.NUnit.csproj
│ ├── Content
│ │ └── NUnitAssertionExtensions.cs
│ ├── ExtensionsForCommandScenario.cs
│ ├── ExtensionsForConstructorScenario.cs
│ ├── ExtensionsForFactoryScenario.cs
│ ├── ExtensionsForQueryScenario.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
│ ├── AggregateSource.Testing.Tests
│ ├── AggregateRootEntityStub.cs
│ ├── AggregateSource.Testing.Tests.csproj
│ ├── CommandScenarioForTests.cs
│ ├── Comparers
│ │ ├── CompareNetObjectsBasedEventComparerTests.cs
│ │ ├── CompareNetObjectsBasedExceptionComparerTests.cs
│ │ ├── CompareNetObjectsBasedFactComparerTests.cs
│ │ └── CompareNetObjectsBasedResultComparerTests.cs
│ ├── ConstructorScenarioForTests.cs
│ ├── EventCentricAggregateCommandTestRunnerTests.cs
│ ├── EventCentricAggregateCommandTestSpecificationTests.cs
│ ├── EventCentricAggregateConstructorTestRunnerTests.cs
│ ├── EventCentricAggregateConstructorTestSpecificationTests.cs
│ ├── EventCentricAggregateFactoryTestRunnerTests.cs
│ ├── EventCentricAggregateFactoryTestSpecificationTests.cs
│ ├── EventCentricTestSpecificationTests.cs
│ ├── ExceptionCentricAggregateCommandTestRunnerTests.cs
│ ├── ExceptionCentricAggregateCommandTestSpecificationTests.cs
│ ├── ExceptionCentricAggregateConstructorTestRunnerTests.cs
│ ├── ExceptionCentricAggregateConstructorTestSpecificationTests.cs
│ ├── ExceptionCentricAggregateFactoryTestRunnerTests.cs
│ ├── ExceptionCentricAggregateFactoryTestSpecificationTests.cs
│ ├── ExceptionCentricAggregateQueryTestRunnerTests.cs
│ ├── ExceptionCentricAggregateQueryTestSpecificationTests.cs
│ ├── ExceptionCentricTestSpecificationTests.cs
│ ├── FactoryScenarioForTests.cs
│ ├── FactsBuilderTests.cs
│ ├── Model.cs
│ ├── NUnitExtensionsForCommandScenarioTests.cs
│ ├── NUnitExtensionsForConstructorScenarioTests.cs
│ ├── NUnitExtensionsForFactoryScenarioTests.cs
│ ├── NUnitExtensionsForQueryScenarioTests.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── QueryScenarioForTests.cs
│ ├── ResultCentricAggregateQueryTestRunnerTests.cs
│ ├── ResultCentricAggregateQueryTestSpecificationTests.cs
│ ├── ScenarioGivenStateBuilderTests.cs
│ ├── ScenarioTests.cs
│ ├── ScenarioThenStateBuilderTests.cs
│ ├── ScenarioThrowStateBuilderTests.cs
│ ├── ScenarioWhenStateBuilderTests.cs
│ ├── TestSpecificationDataPointFixture.cs
│ ├── TestSpecificationTextWriterTests.cs
│ └── packages.config
│ ├── AggregateSource.Testing.Xunit
│ ├── AggregateSource.Testing.Xunit.csproj
│ ├── Content
│ │ └── XunitAssertionExtensions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
│ ├── AggregateSource.Testing.sln
│ ├── AggregateSource.Testing.sln.DotSettings
│ └── AggregateSource.Testing
│ ├── AggregateSource.Testing.csproj
│ ├── Catch.cs
│ ├── Command
│ ├── AggregateCommandGivenNoneStateBuilder.cs
│ ├── AggregateCommandGivenStateBuilder.cs
│ ├── AggregateCommandThenNoneStateBuilder.cs
│ ├── AggregateCommandThenStateBuilder.cs
│ ├── AggregateCommandThrowStateBuilder.cs
│ └── AggregateCommandWhenStateBuilder.cs
│ ├── CommandScenarioFor.cs
│ ├── Comparers
│ ├── CompareNetObjectsBasedEventComparer.cs
│ ├── CompareNetObjectsBasedExceptionComparer.cs
│ ├── CompareNetObjectsBasedFactComparer.cs
│ └── CompareNetObjectsBasedResultComparer.cs
│ ├── Constructor
│ ├── AggregateConstructorThenStateBuilder.cs
│ └── AggregateConstructorThrowStateBuilder.cs
│ ├── ConstructorScenarioFor.cs
│ ├── EventCentricAggregateCommandTestResult.cs
│ ├── EventCentricAggregateCommandTestRunner.cs
│ ├── EventCentricAggregateCommandTestSpecification.cs
│ ├── EventCentricAggregateConstructorTestResult.cs
│ ├── EventCentricAggregateConstructorTestRunner.cs
│ ├── EventCentricAggregateConstructorTestSpecification.cs
│ ├── EventCentricAggregateFactoryTestResult.cs
│ ├── EventCentricAggregateFactoryTestRunner.cs
│ ├── EventCentricAggregateFactoryTestSpecification.cs
│ ├── EventCentricAggregateQueryTestResult.cs
│ ├── EventCentricTestResult.cs
│ ├── EventCentricTestSpecification.cs
│ ├── EventComparisonDifference.cs
│ ├── ExceptionCentricAggregateCommandTestResult.cs
│ ├── ExceptionCentricAggregateCommandTestRunner.cs
│ ├── ExceptionCentricAggregateCommandTestSpecification.cs
│ ├── ExceptionCentricAggregateConstructorTestResult.cs
│ ├── ExceptionCentricAggregateConstructorTestRunner.cs
│ ├── ExceptionCentricAggregateConstructorTestSpecification.cs
│ ├── ExceptionCentricAggregateFactoryTestResult.cs
│ ├── ExceptionCentricAggregateFactoryTestRunner.cs
│ ├── ExceptionCentricAggregateFactoryTestSpecification.cs
│ ├── ExceptionCentricAggregateQueryTestResult.cs
│ ├── ExceptionCentricAggregateQueryTestRunner.cs
│ ├── ExceptionCentricAggregateQueryTestSpecification.cs
│ ├── ExceptionCentricTestResult.cs
│ ├── ExceptionCentricTestSpecification.cs
│ ├── ExceptionComparisonDifference.cs
│ ├── FactComparisonDifference.cs
│ ├── Factory
│ ├── AggregateFactoryGivenNoneStateBuilder.cs
│ ├── AggregateFactoryGivenStateBuilder.cs
│ ├── AggregateFactoryThenNoneStateBuilder.cs
│ ├── AggregateFactoryThenStateBuilder.cs
│ ├── AggregateFactoryThrowStateBuilder.cs
│ └── AggregateFactoryWhenStateBuilder.cs
│ ├── FactoryScenarioFor.cs
│ ├── FactsBuilder.cs
│ ├── IAggregateCommandGivenNoneStateBuilder.cs
│ ├── IAggregateCommandGivenStateBuilder.cs
│ ├── IAggregateCommandInitialStateBuilder.cs
│ ├── IAggregateCommandThenNoneStateBuilder.cs
│ ├── IAggregateCommandThenStateBuilder.cs
│ ├── IAggregateCommandThrowStateBuilder.cs
│ ├── IAggregateCommandWhenStateBuilder.cs
│ ├── IAggregateConstructorThenStateBuilder.cs
│ ├── IAggregateConstructorThrowStateBuilder.cs
│ ├── IAggregateConstructorWhenStateBuilder.cs
│ ├── IAggregateFactoryGivenNoneStateBuilder.cs
│ ├── IAggregateFactoryGivenStateBuilder.cs
│ ├── IAggregateFactoryInitialStateBuilder.cs
│ ├── IAggregateFactoryThenNoneStateBuilder.cs
│ ├── IAggregateFactoryThenStateBuilder.cs
│ ├── IAggregateFactoryThrowStateBuilder.cs
│ ├── IAggregateFactoryWhenStateBuilder.cs
│ ├── IAggregateQueryGivenNoneStateBuilder.cs
│ ├── IAggregateQueryGivenStateBuilder.cs
│ ├── IAggregateQueryInitialStateBuilder.cs
│ ├── IAggregateQueryThenStateBuilder.cs
│ ├── IAggregateQueryThrowStateBuilder.cs
│ ├── IAggregateQueryWhenStateBuilder.cs
│ ├── IEventCentricAggregateCommandTestRunner.cs
│ ├── IEventCentricAggregateCommandTestSpecificationBuilder.cs
│ ├── IEventCentricAggregateConstructorTestRunner.cs
│ ├── IEventCentricAggregateConstructorTestSpecificationBuilder.cs
│ ├── IEventCentricAggregateFactoryTestRunner.cs
│ ├── IEventCentricAggregateFactoryTestSpecificationBuilder.cs
│ ├── IEventCentricTestSpecificationBuilder.cs
│ ├── IEventCentricTestSpecificationRunner.cs
│ ├── IEventCentricTestSpecificationWriter.cs
│ ├── IEventComparer.cs
│ ├── IExceptionCentricAggregateCommandTestRunner.cs
│ ├── IExceptionCentricAggregateCommandTestSpecificationBuilder.cs
│ ├── IExceptionCentricAggregateConstructorTestRunner.cs
│ ├── IExceptionCentricAggregateConstructorTestSpecificationBuilder.cs
│ ├── IExceptionCentricAggregateFactoryTestRunner.cs
│ ├── IExceptionCentricAggregateFactoryTestSpecificationBuilder.cs
│ ├── IExceptionCentricAggregateQueryTestRunner.cs
│ ├── IExceptionCentricAggregateQueryTestSpecificationBuilder.cs
│ ├── IExceptionCentricTestSpecificationBuilder.cs
│ ├── IExceptionCentricTestSpecificationRunner.cs
│ ├── IExceptionCentricTestSpecificationWriter.cs
│ ├── IExceptionComparer.cs
│ ├── IFactComparer.cs
│ ├── IResultCentricAggregateQueryTestRunner.cs
│ ├── IResultCentricAggregateQueryTestSpecificationBuilder.cs
│ ├── IResultComparer.cs
│ ├── IScenarioGivenNoneStateBuilder.cs
│ ├── IScenarioGivenStateBuilder.cs
│ ├── IScenarioInitialStateBuilder.cs
│ ├── IScenarioThenNoneStateBuilder.cs
│ ├── IScenarioThenStateBuilder.cs
│ ├── IScenarioThrowStateBuilder.cs
│ ├── IScenarioWhenStateBuilder.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Query
│ ├── AggregateQueryGivenNoneStateBuilder.cs
│ ├── AggregateQueryGivenStateBuilder.cs
│ ├── AggregateQueryThenStateBuilder.cs
│ ├── AggregateQueryThrowStateBuilder.cs
│ └── AggregateQueryWhenStateBuilder.cs
│ ├── QueryScenarioFor.cs
│ ├── README.md
│ ├── ResultCentricAggregateQueryTestRunner.cs
│ ├── ResultCentricAggregateQueryTestSpecification.cs
│ ├── ResultComparisonDifference.cs
│ ├── Scenario.cs
│ ├── State.cs
│ ├── TestResultState.cs
│ ├── TestSpecificationBuilder.cs
│ ├── TestSpecificationBuilderContext.cs
│ ├── TestSpecificationTextWriter.cs
│ ├── WrappedEventComparerEqualityComparer.cs
│ └── packages.config
├── win_run_me_first.bat
├── win_run_me_right_off_the.bat
└── winbuild
├── TransformProjectToNET40.xslt
├── build.proj
├── ci.proj
├── info.proj
├── master_version.txt
├── nuget.proj
├── nuspec
├── AggregateSource.Content.ExplicitRouting.nuspec
├── AggregateSource.Content.ExplicitStateExplicitRouting.nuspec
├── AggregateSource.EventStore.nuspec
├── AggregateSource.NEventStore.nuspec
├── AggregateSource.Testing.NUnit.nuspec
├── AggregateSource.Testing.Xunit.nuspec
├── AggregateSource.Testing.nuspec
└── AggregateSource.nuspec
├── packages.config
├── run_build.bat
├── run_cibuild.bat
├── run_me_first.proj
├── run_pack.bat
├── run_push.bat
├── run_test.bat
├── test.proj
└── version.proj
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 | *.sln merge=union
7 | *.csproj merge=union
8 | *.vbproj merge=union
9 | *.fsproj merge=union
10 | *.dbproj merge=union
11 |
12 | # Standard to msysgit
13 | *.doc diff=astextplain
14 | *.DOC diff=astextplain
15 | *.docx diff=astextplain
16 | *.DOCX diff=astextplain
17 | *.dot diff=astextplain
18 | *.DOT diff=astextplain
19 | *.pdf diff=astextplain
20 | *.PDF diff=astextplain
21 | *.rtf diff=astextplain
22 | *.RTF diff=astextplain
23 |
--------------------------------------------------------------------------------
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.nuget/nuget.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yreynhout/AggregateSource/7c9f5eeaf714ae51edad8a383c80e5090347d0e0/.nuget/nuget.exe
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 | ====================
3 |
4 | Copyright (c) 2013, Yves Reynhout
5 | All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
8 |
9 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
10 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
11 | Neither the name of the BitTacklr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/docs/backlog.md:
--------------------------------------------------------------------------------
1 | # Non functional issues
2 |
3 | - ~~Fix broken build~~
4 | - ~~Add a license~~
5 | - ~~Build file~~
6 | - ~~Test build on TeamCity~~
7 | - ~~NuSpec~~
8 |
9 | # Functional issues
10 |
11 | ## To complete
12 |
13 | - Extra tests that prove that an identifier can't be null (repository)
14 | - Complete tests for test result
15 | - Complete tests for aggregate scenario test specification infrastructure
16 | - Factory tests are missing
17 | - ThrowsFixture is missing for all
18 | - Usage of indented text writer as the text writer for specifications and results
19 |
20 | ## Features
21 |
22 | - ~~[DESIGN] Replace Guid by String as identifier (supersedes)~~
23 | - ~~[DESIGN] Support both Guid and String as identifier - using conditional compilation~~
24 | - ~~[DESIGN] Support both Guid and String as identifier - using yet another abstraction~~
25 | - ~~[DESIGN] The asynchronous repository~~
26 | - ~~[DESIGN] Snapshotting~~
27 | - [DESIGN] StreamSource - Writing to sql
28 | - [DESIGN] StreamSource - Reading from sql
29 | - [DESIGN] StreamSource - Readonly resource oriented API using Nancy
30 | - Extend SampleSource with an async sample.
31 | - DRY up those repos, there's a SlicedEventStreamReader in them (bonus, we can test this thing separately).
32 | - Build a realistic app on top of this API that shows off entities, aggregates, testing, bulk loading.
33 |
34 | ## Ideas
35 |
36 | AggregateSource.Repositories
37 |
38 | AggregateSource.CollectionRepositories.EventStore
39 | AggregateSource.CollectionRepositories.NEventStore
40 |
41 | AggregateSource.PersistenceRepositories.EventStore
42 | AggregateSource.PersistenceRepositories.NEventStore
43 |
--------------------------------------------------------------------------------
/docs/images/TestSpecificationStatechart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yreynhout/AggregateSource/7c9f5eeaf714ae51edad8a383c80e5090347d0e0/docs/images/TestSpecificationStatechart.png
--------------------------------------------------------------------------------
/lib/geteventstore_integration.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)\packages\MSBuildTasks.1.4.0.56\tools
5 |
6 |
7 |
8 |
9 |
13 |
17 |
21 |
22 |
--------------------------------------------------------------------------------
/lib/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/linuxbuild/mono-build.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)/..
5 | $(RootPath)/src
6 |
7 |
8 |
9 |
12 |
13 |
14 |
17 |
20 |
21 |
22 |
29 |
30 |
--------------------------------------------------------------------------------
/linuxbuild/mono-info.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)/..
5 | $(RootPath)/src
6 | $(MSBuildProjectDirectory)/packages
7 | $(PackagesPath)/MSBuildTasks.1.4.0.56/tools
8 |
9 |
10 |
11 |
12 |
15 |
16 |
28 |
29 |
--------------------------------------------------------------------------------
/linuxbuild/mono-version.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)/..
5 | $(RootPath)/src
6 | $(MSBuildProjectDirectory)/packages
7 | $(PackagesPath)/MSBuildTasks.1.4.0.56/tools
8 |
9 |
10 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
--------------------------------------------------------------------------------
/src/.nuget/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Content.ExplicitRouting/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yreynhout/AggregateSource/7c9f5eeaf714ae51edad8a383c80e5090347d0e0/src/Core/AggregateSource.Content.ExplicitRouting/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Content.ExplicitRouting/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | [assembly: AssemblyTitle("AggregateSource")]
5 | [assembly:
6 | AssemblyDescription(
7 | "AggregateSource provides lightweight infrastructure for building an eventsourced, aggregate based domain model."
8 | )]
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Content.ExplicitRouting/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Content.ExplicitStateExplicitRouting/EntityState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AggregateSource
4 | {
5 | ///
6 | /// Base class for aggregate state objects that need some basic infrastructure for routing events to handlers.
7 | ///
8 | public abstract class EntityState : IInstanceEventRouter
9 | {
10 | readonly InstanceEventRouter _router;
11 |
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | protected EntityState()
16 | {
17 | _router = new InstanceEventRouter();
18 | }
19 |
20 | ///
21 | /// Registers the state handler to be invoked when the specified event is applied.
22 | ///
23 | /// The type of the event to register the handler for.
24 | /// The handler.
25 | /// Thrown when the is null.
26 | protected void Register(Action handler)
27 | {
28 | if (handler == null) throw new ArgumentNullException("handler");
29 | _router.ConfigureRoute(handler);
30 | }
31 |
32 | ///
33 | /// Routes the specified to a configured state handler, if any.
34 | ///
35 | /// The event to route.
36 | /// Thrown when the is null.
37 | public void Route(object @event)
38 | {
39 | if (@event == null) throw new ArgumentNullException("event");
40 | _router.Route(@event);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Content.ExplicitStateExplicitRouting/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | [assembly: AssemblyTitle("AggregateSource")]
5 | [assembly:
6 | AssemblyDescription(
7 | "AggregateSource provides lightweight infrastructure for building an eventsourced, aggregate based domain model."
8 | )]
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Content.ExplicitStateExplicitRouting/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Tests/AggregateRootEntityStub.cs:
--------------------------------------------------------------------------------
1 | namespace AggregateSource
2 | {
3 | public class AggregateRootEntityStub : AggregateRootEntity
4 | {
5 | }
6 | }
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Tests/AggregateStubs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace AggregateSource
4 | {
5 | public static class AggregateStubs
6 | {
7 | static readonly Random Random = new Random();
8 |
9 | public static readonly Aggregate Stub1 =
10 | Create("Stub/123", new AggregateRootEntityStub());
11 |
12 | public static readonly Aggregate Stub2 =
13 | Create("Stub/456", new AggregateRootEntityStub());
14 |
15 | public static Aggregate Create(TAggregateRoot root)
16 | where TAggregateRoot : IAggregateRootEntity
17 | {
18 | return new Aggregate("Stub/" + Random.Next(), 0, root);
19 | }
20 |
21 | public static Aggregate Create(string identifier, TAggregateRoot root)
22 | where TAggregateRoot : IAggregateRootEntity
23 | {
24 | return new Aggregate(identifier, 0, root);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Tests/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yreynhout/AggregateSource/7c9f5eeaf714ae51edad8a383c80e5090347d0e0/src/Core/AggregateSource.Tests/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | [assembly: AssemblyTitle("AggregateSource.Tests")]
5 | [assembly:
6 | AssemblyDescription(
7 | "AggregateSource provides lightweight infrastructure for building an eventsourced, aggregate based domain model. Unit tests."
8 | )]
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Tests/TestFactBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 |
4 | namespace AggregateSource
5 | {
6 | class TestFactBuilder
7 | {
8 | readonly string _identifier;
9 | readonly object _event;
10 |
11 | public TestFactBuilder()
12 | {
13 | _identifier = new Random().Next().ToString(CultureInfo.CurrentCulture);
14 | _event = new object();
15 | }
16 |
17 | TestFactBuilder(string identifier, object @event)
18 | {
19 | _identifier = identifier;
20 | _event = @event;
21 | }
22 |
23 | public TestFactBuilder WithEvent(object @event)
24 | {
25 | return new TestFactBuilder(_identifier, @event);
26 | }
27 |
28 | public TestFactBuilder WithIdentifier(string identifier)
29 | {
30 | return new TestFactBuilder(identifier, _event);
31 | }
32 |
33 | public Fact Build()
34 | {
35 | return new Fact(_identifier, _event);
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/src/Core/AggregateSource.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/src/Core/AggregateSource.sln.DotSettings:
--------------------------------------------------------------------------------
1 |
2 | False
--------------------------------------------------------------------------------
/src/Core/AggregateSource/AggregateSourceException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.Serialization;
3 |
4 | namespace AggregateSource
5 | {
6 | ///
7 | /// Marker exception for this library from which all its exceptions derive.
8 | ///
9 | [Serializable]
10 | public class AggregateSourceException : Exception
11 | {
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | public AggregateSourceException() {}
16 |
17 | ///
18 | /// Initializes a new instance of the class.
19 | ///
20 | /// The message that describes the error.
21 | public AggregateSourceException(string message)
22 | : base(message) {}
23 |
24 | ///
25 | /// Initializes a new instance of the class.
26 | ///
27 | /// The error message that explains the reason for the exception.
28 | /// The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified.
29 | public AggregateSourceException(string message, Exception innerException)
30 | : base(message, innerException) {}
31 |
32 | ///
33 | /// Initializes a new instance of the class.
34 | ///
35 | /// The that holds the serialized object data about the exception being thrown.
36 | /// The that contains contextual information about the source or destination.
37 | protected AggregateSourceException(SerializationInfo info, StreamingContext context) : base(info, context) {}
38 | }
39 | }
--------------------------------------------------------------------------------
/src/Core/AggregateSource/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yreynhout/AggregateSource/7c9f5eeaf714ae51edad8a383c80e5090347d0e0/src/Core/AggregateSource/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/src/Core/AggregateSource/IAggregateChangeTracker.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace AggregateSource
4 | {
5 | ///
6 | /// Tracks changes that happen to an aggregate
7 | ///
8 | public interface IAggregateChangeTracker
9 | {
10 | ///
11 | /// Determines whether this instance has state changes.
12 | ///
13 | ///
14 | /// true if this instance has state changes; otherwise, false.
15 | ///
16 | bool HasChanges();
17 |
18 | ///
19 | /// Gets the state changes applied to this instance.
20 | ///
21 | /// A list of recorded state changes.
22 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
23 | IEnumerable