Browse files

Merge branch 'master' of http://github.com/joliver/CommonDomain.git

Conflicts:
	src/tests/CommonDomain.AcceptanceTests/When_an_aggregate_is_persisted.cs
  • Loading branch information...
2 parents 4943d70 + ebe07bf commit df9906a90ac9ac8a3a8df9c13d1669dc89a0fb08 @CaptainCodeman CaptainCodeman committed Mar 31, 2011
Showing with 279 additions and 461 deletions.
  1. BIN lib/eventstore-bin/.NET 3.5/EventStore.Persistence.MongoPersistence.dll
  2. BIN lib/eventstore-bin/.NET 3.5/EventStore.Persistence.RavenPersistence.dll
  3. BIN lib/eventstore-bin/.NET 3.5/EventStore.Serialization.Json.dll
  4. BIN lib/eventstore-bin/.NET 3.5/EventStore.Serialization.ServiceStack.dll
  5. BIN lib/eventstore-bin/.NET 3.5/EventStore.dll
  6. BIN lib/eventstore-bin/.NET 3.5/EventStore.pdb
  7. +101 −41 lib/eventstore-bin/.NET 3.5/EventStore.xml
  8. BIN lib/eventstore-bin/.NET 4.0/EventStore.Persistence.MongoPersistence.dll
  9. BIN lib/eventstore-bin/.NET 4.0/EventStore.Persistence.RavenPersistence.dll
  10. BIN lib/eventstore-bin/.NET 4.0/EventStore.Serialization.Json.dll
  11. BIN lib/eventstore-bin/.NET 4.0/EventStore.Serialization.ServiceStack.dll
  12. BIN lib/eventstore-bin/.NET 4.0/EventStore.dll
  13. BIN lib/eventstore-bin/.NET 4.0/EventStore.pdb
  14. +101 −41 lib/eventstore-bin/.NET 4.0/EventStore.xml
  15. BIN lib/eventstore-bin/doc/EventStore - Transactional Integrity without Transactions.docx
  16. +25 −0 lib/eventstore-bin/doc/ServiceStack license.txt
  17. +9 −7 lib/eventstore-bin/doc/acknowledgements.txt
  18. +23 −19 lib/eventstore-bin/doc/license.txt
  19. +20 −8 lib/eventstore-bin/doc/roadmap.txt
  20. +0 −7 src/CommonDomain.sln
  21. +0 −92 src/tests/CommonDomain.AcceptanceTests/CommonDomain.AcceptanceTests.csproj
  22. +0 −2 src/tests/CommonDomain.AcceptanceTests/Properties/AssemblyInfo.cs
  23. +0 −174 src/tests/CommonDomain.AcceptanceTests/When_routing_using_conventions.cs
  24. +0 −70 src/tests/CommonDomain.AcceptanceTests/in_the_event_store.cs
View
BIN lib/eventstore-bin/.NET 3.5/EventStore.Persistence.MongoPersistence.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 3.5/EventStore.Persistence.RavenPersistence.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 3.5/EventStore.Serialization.Json.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 3.5/EventStore.Serialization.ServiceStack.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 3.5/EventStore.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 3.5/EventStore.pdb
Binary file not shown.
View
142 lib/eventstore-bin/.NET 3.5/EventStore.xml
@@ -34,36 +34,112 @@
<param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
</member>
- <member name="T:EventStore.Persistence.StorageOfflineException">
+ <member name="T:EventStore.IPipelineHook">
+ <summary>
+ Provides the ability to hook into the pipeline of persisting a commit.
+ </summary>
+ </member>
+ <member name="M:EventStore.IPipelineHook.Select(EventStore.Commit)">
+ <summary>
+ Hooks into the selection pipeline just prior to the commit being returned to the caller.
+ </summary>
+ <param name="committed">The commit to be filtered.</param>
+ <returns>If successful, returns a populated commit; otherwise returns null.</returns>
+ </member>
+ <member name="M:EventStore.IPipelineHook.PreCommit(EventStore.Commit)">
+ <summary>
+ Hooks into the commit pipeline prior to persisting the commit to durable storage.
+ </summary>
+ <param name="attempt">The attempt to be committed.</param>
+ <returns>If processing should continue, returns true; otherwise returns false.</returns>
+ </member>
+ <member name="M:EventStore.IPipelineHook.PostCommit(EventStore.Commit)">
+ <summary>
+ Hooks into the commit pipeline just after the commit has been *successfully* committed to durable storage.
+ </summary>
+ <param name="committed">The commit which has been persisted.</param>
+ </member>
+ <member name="T:EventStore.Persistence.StorageException">
+ <summary>
+ Represents a general failure of the storage engine or persistence infrastructure.
+ </summary>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ <param name="message">The message that describes the error.</param>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor(System.String,System.Exception)">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ <param name="message">The message that describes the error.</param>
+ <param name="innerException">The message that is the cause of the current exception.</param>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ <param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
+ <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+ </member>
+ <member name="T:EventStore.Persistence.StorageUnavailableException">
<summary>
Indicates that the underlying persistence medium is unavailable or offline.
</summary>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor(System.String)">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor(System.String)">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
<param name="message">The message that describes the error.</param>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor(System.String,System.Exception)">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor(System.String,System.Exception)">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
<param name="message">The message that describes the error.</param>
<param name="innerException">The message that is the cause of the current exception.</param>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
<param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
</member>
+ <member name="T:EventStore.Serialization.IDocumentSerializer">
+ <summary>
+ Provides the ability to serialize an object graph to and from a document.
+ </summary>
+ </member>
+ <member name="M:EventStore.Serialization.IDocumentSerializer.Serialize``1(``0)">
+ <summary>
+ Serializes the object graph provided into a document.
+ </summary>
+ <typeparam name="T">The type of object to be serialized</typeparam>
+ <param name="graph">The object graph to be serialized.</param>
+ <returns>The document form of the graph provided.</returns>
+ </member>
+ <member name="M:EventStore.Serialization.IDocumentSerializer.Deserialize``1(System.Object)">
+ <summary>
+ Deserializes the document provided into an object graph.
+ </summary>
+ <typeparam name="T">The type of object graph.</typeparam>
+ <param name="document">The document to be deserialized.</param>
+ <returns>An object graph of the specified type.</returns>
+ </member>
<member name="T:EventStore.StreamNotFoundException">
<summary>
Represents an attempt to commit the same information more than once.
@@ -120,6 +196,7 @@
<param name="maxRevision">The maximum revision of the stream to be read.</param>
<returns>A series of committed events from the stream specified sorted in ascending order..</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.ICommitEvents.Commit(EventStore.Commit)">
<summary>
@@ -128,6 +205,7 @@
<param name="attempt">The series of events and associated metadata to be commited.</param>
<exception cref="T:EventStore.ConcurrencyException" />
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.IEventStream">
<summary>
@@ -151,6 +229,7 @@
<exception cref="T:EventStore.DuplicateCommitException" />
<exception cref="T:EventStore.ConcurrencyException" />
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.IEventStream.ClearChanges">
<summary>
@@ -200,6 +279,7 @@
<param name="maxRevision">The maximum revision possible for the desired snapshot.</param>
<returns>If found, it returns the snapshot; otherwise null is returned.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.IAccessSnapshots.AddSnapshot(EventStore.Snapshot)">
<summary>
@@ -208,6 +288,7 @@
<param name="snapshot">The snapshot to save.</param>
<returns>If the snapshot was added, returns true; otherwise false.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.IStoreEvents">
<summary>
@@ -231,6 +312,7 @@
<param name="maxRevision">The maximum revision of the stream to be read.</param>
<returns>A series of committed events represented as a stream.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
<exception cref="T:EventStore.StreamNotFoundException" />
</member>
<member name="M:EventStore.IStoreEvents.OpenStream(EventStore.Snapshot,System.Int32)">
@@ -241,6 +323,7 @@
<param name="maxRevision">The maximum revision of the stream to be read.</param>
<returns>A series of committed events represented as a stream.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.EventMessage">
<summary>
@@ -348,10 +431,11 @@
Provides the ability to serialize and deserialize an object graph.
</summary>
</member>
- <member name="M:EventStore.Serialization.ISerialize.Serialize(System.IO.Stream,System.Object)">
+ <member name="M:EventStore.Serialization.ISerialize.Serialize``1(System.IO.Stream,``0)">
<summary>
Serializes the object graph provided and writes a serialized representation to the output stream provided.
</summary>
+ <typeparam name="T">The type of object to be serialized</typeparam>
<param name="output">The stream into which the serialized object graph should be written.</param>
<param name="graph">The object graph to be serialized.</param>
</member>
@@ -403,6 +487,7 @@
Initializes and prepares the storage for use, if not already performed.
</summary>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.GetFrom(System.DateTime)">
<summary>
@@ -411,20 +496,23 @@
<param name="start">The point in time at which to start.</param>
<returns>All commits that have occurred on or after the specified starting time.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.GetUndispatchedCommits">
<summary>
Gets a set of commits that has not yet been dispatched.
</summary>
<returns>The set of commits to be dispatched.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.MarkCommitAsDispatched(EventStore.Commit)">
<summary>
Marks the commit specified as dispatched.
</summary>
<param name="commit">The commit to be marked as dispatched.</param>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.GetStreamsToSnapshot(System.Int32)">
<summary>
@@ -433,46 +521,18 @@
<param name="maxThreshold">The maximum difference between the head and most recent snapshot revisions.</param>
<returns>The streams for which the head and snapshot revisions differ by at least the threshold specified.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
- </member>
- <member name="T:EventStore.Persistence.StorageException">
- <summary>
- Represents a general failure of the storage engine or persistence infrastructure.
- </summary>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor(System.String)">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- <param name="message">The message that describes the error.</param>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor(System.String,System.Exception)">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- <param name="message">The message that describes the error.</param>
- <param name="innerException">The message that is the cause of the current exception.</param>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- <param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
- <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.Serialization.SerializationExtensions">
<summary>
Implements extension methods that make call to the serialization infrastructure more simple.
</summary>
</member>
- <member name="M:EventStore.Serialization.SerializationExtensions.Serialize(EventStore.Serialization.ISerialize,System.Object)">
+ <member name="M:EventStore.Serialization.SerializationExtensions.Serialize``1(EventStore.Serialization.ISerialize,``0)">
<summary>
Serializes the object provided.
</summary>
+ <typeparam name="T">The type of object to be serialized</typeparam>
<param name="serializer">The serializer to use.</param>
<param name="value">The object graph to be serialized.</param>
<returns>A serialized representation of the object graph provided.</returns>
View
BIN lib/eventstore-bin/.NET 4.0/EventStore.Persistence.MongoPersistence.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 4.0/EventStore.Persistence.RavenPersistence.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 4.0/EventStore.Serialization.Json.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 4.0/EventStore.Serialization.ServiceStack.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 4.0/EventStore.dll
Binary file not shown.
View
BIN lib/eventstore-bin/.NET 4.0/EventStore.pdb
Binary file not shown.
View
142 lib/eventstore-bin/.NET 4.0/EventStore.xml
@@ -34,36 +34,112 @@
<param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
</member>
- <member name="T:EventStore.Persistence.StorageOfflineException">
+ <member name="T:EventStore.IPipelineHook">
+ <summary>
+ Provides the ability to hook into the pipeline of persisting a commit.
+ </summary>
+ </member>
+ <member name="M:EventStore.IPipelineHook.Select(EventStore.Commit)">
+ <summary>
+ Hooks into the selection pipeline just prior to the commit being returned to the caller.
+ </summary>
+ <param name="committed">The commit to be filtered.</param>
+ <returns>If successful, returns a populated commit; otherwise returns null.</returns>
+ </member>
+ <member name="M:EventStore.IPipelineHook.PreCommit(EventStore.Commit)">
+ <summary>
+ Hooks into the commit pipeline prior to persisting the commit to durable storage.
+ </summary>
+ <param name="attempt">The attempt to be committed.</param>
+ <returns>If processing should continue, returns true; otherwise returns false.</returns>
+ </member>
+ <member name="M:EventStore.IPipelineHook.PostCommit(EventStore.Commit)">
+ <summary>
+ Hooks into the commit pipeline just after the commit has been *successfully* committed to durable storage.
+ </summary>
+ <param name="committed">The commit which has been persisted.</param>
+ </member>
+ <member name="T:EventStore.Persistence.StorageException">
+ <summary>
+ Represents a general failure of the storage engine or persistence infrastructure.
+ </summary>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor(System.String)">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ <param name="message">The message that describes the error.</param>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor(System.String,System.Exception)">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ <param name="message">The message that describes the error.</param>
+ <param name="innerException">The message that is the cause of the current exception.</param>
+ </member>
+ <member name="M:EventStore.Persistence.StorageException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <summary>
+ Initializes a new instance of the StorageException class.
+ </summary>
+ <param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
+ <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+ </member>
+ <member name="T:EventStore.Persistence.StorageUnavailableException">
<summary>
Indicates that the underlying persistence medium is unavailable or offline.
</summary>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor(System.String)">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor(System.String)">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
<param name="message">The message that describes the error.</param>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor(System.String,System.Exception)">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor(System.String,System.Exception)">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
<param name="message">The message that describes the error.</param>
<param name="innerException">The message that is the cause of the current exception.</param>
</member>
- <member name="M:EventStore.Persistence.StorageOfflineException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
+ <member name="M:EventStore.Persistence.StorageUnavailableException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
<summary>
- Initializes a new instance of the StorageOfflineException class.
+ Initializes a new instance of the StorageUnavailableException class.
</summary>
<param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
<param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
</member>
+ <member name="T:EventStore.Serialization.IDocumentSerializer">
+ <summary>
+ Provides the ability to serialize an object graph to and from a document.
+ </summary>
+ </member>
+ <member name="M:EventStore.Serialization.IDocumentSerializer.Serialize``1(``0)">
+ <summary>
+ Serializes the object graph provided into a document.
+ </summary>
+ <typeparam name="T">The type of object to be serialized</typeparam>
+ <param name="graph">The object graph to be serialized.</param>
+ <returns>The document form of the graph provided.</returns>
+ </member>
+ <member name="M:EventStore.Serialization.IDocumentSerializer.Deserialize``1(System.Object)">
+ <summary>
+ Deserializes the document provided into an object graph.
+ </summary>
+ <typeparam name="T">The type of object graph.</typeparam>
+ <param name="document">The document to be deserialized.</param>
+ <returns>An object graph of the specified type.</returns>
+ </member>
<member name="T:EventStore.StreamNotFoundException">
<summary>
Represents an attempt to commit the same information more than once.
@@ -120,6 +196,7 @@
<param name="maxRevision">The maximum revision of the stream to be read.</param>
<returns>A series of committed events from the stream specified sorted in ascending order..</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.ICommitEvents.Commit(EventStore.Commit)">
<summary>
@@ -128,6 +205,7 @@
<param name="attempt">The series of events and associated metadata to be commited.</param>
<exception cref="T:EventStore.ConcurrencyException" />
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.IEventStream">
<summary>
@@ -151,6 +229,7 @@
<exception cref="T:EventStore.DuplicateCommitException" />
<exception cref="T:EventStore.ConcurrencyException" />
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.IEventStream.ClearChanges">
<summary>
@@ -200,6 +279,7 @@
<param name="maxRevision">The maximum revision possible for the desired snapshot.</param>
<returns>If found, it returns the snapshot; otherwise null is returned.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.IAccessSnapshots.AddSnapshot(EventStore.Snapshot)">
<summary>
@@ -208,6 +288,7 @@
<param name="snapshot">The snapshot to save.</param>
<returns>If the snapshot was added, returns true; otherwise false.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.IStoreEvents">
<summary>
@@ -231,6 +312,7 @@
<param name="maxRevision">The maximum revision of the stream to be read.</param>
<returns>A series of committed events represented as a stream.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
<exception cref="T:EventStore.StreamNotFoundException" />
</member>
<member name="M:EventStore.IStoreEvents.OpenStream(EventStore.Snapshot,System.Int32)">
@@ -241,6 +323,7 @@
<param name="maxRevision">The maximum revision of the stream to be read.</param>
<returns>A series of committed events represented as a stream.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.EventMessage">
<summary>
@@ -348,10 +431,11 @@
Provides the ability to serialize and deserialize an object graph.
</summary>
</member>
- <member name="M:EventStore.Serialization.ISerialize.Serialize(System.IO.Stream,System.Object)">
+ <member name="M:EventStore.Serialization.ISerialize.Serialize``1(System.IO.Stream,``0)">
<summary>
Serializes the object graph provided and writes a serialized representation to the output stream provided.
</summary>
+ <typeparam name="T">The type of object to be serialized</typeparam>
<param name="output">The stream into which the serialized object graph should be written.</param>
<param name="graph">The object graph to be serialized.</param>
</member>
@@ -403,6 +487,7 @@
Initializes and prepares the storage for use, if not already performed.
</summary>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.GetFrom(System.DateTime)">
<summary>
@@ -411,20 +496,23 @@
<param name="start">The point in time at which to start.</param>
<returns>All commits that have occurred on or after the specified starting time.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.GetUndispatchedCommits">
<summary>
Gets a set of commits that has not yet been dispatched.
</summary>
<returns>The set of commits to be dispatched.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.MarkCommitAsDispatched(EventStore.Commit)">
<summary>
Marks the commit specified as dispatched.
</summary>
<param name="commit">The commit to be marked as dispatched.</param>
<exception cref="T:EventStore.Persistence.StorageException" />
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="M:EventStore.Persistence.IPersistStreams.GetStreamsToSnapshot(System.Int32)">
<summary>
@@ -433,46 +521,18 @@
<param name="maxThreshold">The maximum difference between the head and most recent snapshot revisions.</param>
<returns>The streams for which the head and snapshot revisions differ by at least the threshold specified.</returns>
<exception cref="T:EventStore.Persistence.StorageException" />
- </member>
- <member name="T:EventStore.Persistence.StorageException">
- <summary>
- Represents a general failure of the storage engine or persistence infrastructure.
- </summary>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor(System.String)">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- <param name="message">The message that describes the error.</param>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor(System.String,System.Exception)">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- <param name="message">The message that describes the error.</param>
- <param name="innerException">The message that is the cause of the current exception.</param>
- </member>
- <member name="M:EventStore.Persistence.StorageException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Initializes a new instance of the StorageException class.
- </summary>
- <param name="info">The SerializationInfo that holds the serialized object data of the exception being thrown.</param>
- <param name="context">The StreamingContext that contains contextual information about the source or destination.</param>
+ <exception cref="T:EventStore.Persistence.StorageUnavailableException" />
</member>
<member name="T:EventStore.Serialization.SerializationExtensions">
<summary>
Implements extension methods that make call to the serialization infrastructure more simple.
</summary>
</member>
- <member name="M:EventStore.Serialization.SerializationExtensions.Serialize(EventStore.Serialization.ISerialize,System.Object)">
+ <member name="M:EventStore.Serialization.SerializationExtensions.Serialize``1(EventStore.Serialization.ISerialize,``0)">
<summary>
Serializes the object provided.
</summary>
+ <typeparam name="T">The type of object to be serialized</typeparam>
<param name="serializer">The serializer to use.</param>
<param name="value">The object graph to be serialized.</param>
<returns>A serialized representation of the object graph provided.</returns>
View
BIN lib/eventstore-bin/doc/EventStore - Transactional Integrity without Transactions.docx
Binary file not shown.
View
25 lib/eventstore-bin/doc/ServiceStack license.txt
@@ -0,0 +1,25 @@
+Copyright (c) 2007-2011, Demis Bellot, ServiceStack.
+http://www.servicestack.net
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * 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.
+ * Neither the name of the ServiceStack nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+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 <COPYRIGHT HOLDER> 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.
View
16 lib/eventstore-bin/doc/acknowledgements.txt
@@ -1,7 +1,9 @@
-Jonathan Oliver (me) @jonathan_oliver https://github.com/joliver http://jonathan-oliver.blogspot.com
-Greg Young @gregyoung https://github.com/gregoryyoung http://codebetter.com/gregyoung
-Andreas Ohlund @andreas_ohlund https://github.com/andreasohlund http://http://andreasohlund.net
-Jonathan Matheus @kblooie https://github.com/kblooie
-Aaron Navarro @aaron_navarro https://github.com/anavarro9731
-Simon Green https://github.com/CaptainCodeman http://www.captaincodeman.com
-Chris Nicola @lucisferre https://github.com/lucisferre http://www.lucisferre.net
+Jonathan Oliver @jonathan_oliver https://github.com/joliver http://blog.jonathanoliver.com
+Greg Young @gregyoung https://github.com/gregoryyoung http://codebetter.com/gregyoung
+Andreas Ohlund @andreas_ohlund https://github.com/andreasohlund http://andreasohlund.net
+Jonathan Matheus @kblooie https://github.com/kblooie
+Aaron Navarro @aaron_navarro https://github.com/anavarro9731
+Simon Green https://github.com/CaptainCodeman http://www.captaincodeman.com
+Chris Nicola @lucisferre https://github.com/lucisferre http://www.lucisferre.net
+Pieter Joost @pjvds https://github.com/pjvds http://ncqrs.org
+Daniel Hoelbling @tigraine https://github.com/Tigraine http://www.tigraine.at
View
42 lib/eventstore-bin/doc/license.txt
@@ -1,19 +1,23 @@
-Copyright (c) 2010 Jonathan Oliver
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER 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.
+Copyright (c) 2011 Jonathan Oliver
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER 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.
+
+NOTE: Various optional and subordinate components carry their own licensing
+requirements and restrictions. Use of those components is subject to the terms
+and conditions outlined the respective license of each component.
View
28 lib/eventstore-bin/doc/roadmap.txt
@@ -1,8 +1,20 @@
-- Add documentation and quickstart examples
-- Version on build (git specific?)
-- Create fluent configuration code that doesn't require an IoC container.
-- Create adapters for the storage engines listed in readme.
-- Website?
-- Master/slave replication "helper"
- * When failing over from master to slave, ensure that the most recent commits are in the slave.
- * If not, push the commits to the slave to help avoid a split brain condition.
+- Add documentation and quickstart examples
+- Version on build (git specific?)
+- Create adapters for the storage engines listed in readme.
+- Website?
+- Master/slave replication "helper"
+ * When failing over from master to slave, ensure that the most recent commits are in the slave.
+ * If not, push the commits to the slave to help avoid a split brain condition.
+
+- Polling Dispatcher which polls the event store at the specified frequency and dispatches and new
+ commits which have been added.
+
+- Multi-format Deserializer which attempts a number of internal deserializers (JSON, BSON, PB, Binary, XML, etc)
+ before giving up. This would allow people to change their serialization in production if necessary
+ for things like encryption, etc. For example, we're changing the encryption on all commits and we need to
+ support several keys simultaenously for a period of time...
+
+- migrate events to new storage engine
+
+- Add tests to show paging issues when querying large number of commits from document/blob storage engines
+ - Mongo, Raven, Azure, SimpleDB, Couch?, etc.
View
7 src/CommonDomain.sln
@@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonDomain.Persistence",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonDomain.Persistence.EventStore", "proj\CommonDomain.Persistence.EventStore\CommonDomain.Persistence.EventStore.csproj", "{F489D9D1-F275-4018-A86F-D84352BCD4E9}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonDomain.AcceptanceTests", "tests\CommonDomain.AcceptanceTests\CommonDomain.AcceptanceTests.csproj", "{115A8436-93A0-4481-802C-CBC15285FF4E}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -37,10 +35,6 @@ Global
{F489D9D1-F275-4018-A86F-D84352BCD4E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F489D9D1-F275-4018-A86F-D84352BCD4E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F489D9D1-F275-4018-A86F-D84352BCD4E9}.Release|Any CPU.Build.0 = Release|Any CPU
- {115A8436-93A0-4481-802C-CBC15285FF4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {115A8436-93A0-4481-802C-CBC15285FF4E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {115A8436-93A0-4481-802C-CBC15285FF4E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {115A8436-93A0-4481-802C-CBC15285FF4E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -50,6 +44,5 @@ Global
{51C99F4D-CCF0-431A-B37C-D620EF1DF37B} = {06FD3DEE-6B33-408C-AFE4-6FADE5525AB0}
{75C8F482-B38D-428C-AD67-890B40E35A63} = {06FD3DEE-6B33-408C-AFE4-6FADE5525AB0}
{F489D9D1-F275-4018-A86F-D84352BCD4E9} = {06FD3DEE-6B33-408C-AFE4-6FADE5525AB0}
- {115A8436-93A0-4481-802C-CBC15285FF4E} = {092DA80E-4854-41FD-91F7-D996F41419F2}
EndGlobalSection
EndGlobal
View
92 src/tests/CommonDomain.AcceptanceTests/CommonDomain.AcceptanceTests.csproj
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{115A8436-93A0-4481-802C-CBC15285FF4E}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>CommonDomain.AcceptanceTests</RootNamespace>
- <AssemblyName>CommonDomain.AcceptanceTests</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Machine.Specifications">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- <HintPath>..\..\..\bin\machine.specifications-bin\.NET 3.5\Machine.Specifications.dll</HintPath>
- </Reference>
- <Reference Include="Machine.Specifications" Condition="$(TargetFrameworkVersion)=='v4.0'">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- <HintPath>..\..\..\bin\machine.specifications-bin\.NET 4.0\Machine.Specifications.dll</HintPath>
- </Reference>
- <Reference Include="EventStore">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- <HintPath>..\..\..\lib\eventstore-bin\.NET 3.5\EventStore.dll</HintPath>
- </Reference>
- <Reference Include="EventStore" Condition="$(TargetFrameworkVersion)=='v4.0'">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- <HintPath>..\..\..\lib\eventstore-bin\.NET 4.0\EventStore.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\proj\GlobalAssemblyInfo.cs">
- <Link>Properties\GlobalAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\..\proj\GlobalSuppressions.cs">
- <Link>Properties\GlobalSuppressions.cs</Link>
- </Compile>
- <Compile Include="..\..\proj\VersionAssemblyInfo.cs">
- <Link>Properties\VersionAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="in_the_event_store.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="When_an_aggregate_is_persisted.cs" />
- <Compile Include="When_routing_using_conventions.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\proj\CommonDomain.Core\CommonDomain.Core.csproj">
- <Project>{51C99F4D-CCF0-431A-B37C-D620EF1DF37B}</Project>
- <Name>CommonDomain.Core</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\proj\CommonDomain.Persistence.EventStore\CommonDomain.Persistence.EventStore.csproj">
- <Project>{F489D9D1-F275-4018-A86F-D84352BCD4E9}</Project>
- <Name>CommonDomain.Persistence.EventStore</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\proj\CommonDomain.Persistence\CommonDomain.Persistence.csproj">
- <Project>{75C8F482-B38D-428C-AD67-890B40E35A63}</Project>
- <Name>CommonDomain.Persistence</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\proj\CommonDomain\CommonDomain.csproj">
- <Project>{E07187E1-EEE1-44DF-996A-C4733F327BDC}</Project>
- <Name>CommonDomain</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Content Include="..\..\proj\CustomDictionary.xml">
- <Link>Properties\CustomDictionary.xml</Link>
- </Content>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project>
View
2 src/tests/CommonDomain.AcceptanceTests/Properties/AssemblyInfo.cs
@@ -1,2 +0,0 @@
-using System.Reflection;
-[assembly: AssemblyTitle("CommonDomain.AcceptanceTests")]
View
174 src/tests/CommonDomain.AcceptanceTests/When_routing_using_conventions.cs
@@ -1,174 +0,0 @@
-#pragma warning disable 169
-// ReSharper disable InconsistentNaming
-
-namespace CommonDomain.AcceptanceTests
-{
- using Core;
- using Machine.Specifications;
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_has_a_matching_apply_method :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Because of = () =>
- router.Dispatch(new MessageA());
-
- It should_call_the_apply_method = () =>
- aggregate.ApplyForMessageACalled.ShouldBeTrue();
- }
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_has_a_matching_apply_method_that_is_private :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Because of = () =>
- router.Dispatch(new MessageB());
-
- It should_call_the_apply_method = () =>
- aggregate.ApplyForMessageBCalled.ShouldBeTrue();
- }
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_has_a_matching_apply_method_that_is_static :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Establish context = () =>
- MockAggregate.ApplyForMessageCCalled = false;
-
- Because of = () => router.Dispatch(new MessageC());
-
- It should_not_call_the_apply_method = () => MockAggregate.ApplyForMessageCCalled.ShouldBeFalse();
- }
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_has_a_matching_apply_method_with_multiple_parameters :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Because of = () =>
- router.Dispatch(new MessageD());
-
- It should_not_call_the_apply_method = () =>
- aggregate.ApplyForMessageDCalled.ShouldBeFalse();
- }
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_has_a_matching_apply_method_that_does_not_return_void :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Because of = () =>
- router.Dispatch(new MessageE());
-
- It should_not_call_the_apply_method = () =>
- aggregate.ApplyForMessageECalled.ShouldBeFalse();
- }
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_does_not_have_a_matching_apply_method :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Establish context = () =>
- MockAggregate.ApplyForMessageCCalled = false;
-
- Because of = () => router.Dispatch(new MessageF());
-
- It should_not_call_any_apply_methods = () =>
- {
- aggregate.ApplyForMessageACalled.ShouldBeFalse();
- aggregate.ApplyForMessageBCalled.ShouldBeFalse();
- MockAggregate.ApplyForMessageCCalled.ShouldBeFalse();
- };
- }
-
- [Subject("Routing Events")]
- public class When_dispatching_a_message_with_a_registered_aggregate_that_has_a_matching_apply_method_and_a_manually_registered_handler :
- With_a_convention_event_router_and_registered_aggregate<object>
- {
- Establish context = () =>
- router.Register<MessageA>(m => { });
-
- Because of = () =>
- router.Dispatch(new MessageA());
-
- It should_not_call_the_apply_method = () =>
- aggregate.ApplyForMessageACalled.ShouldBeFalse();
-
- It should_call_the_manual_handler = () =>
- aggregate.ApplyForMessageACalled.ShouldBeFalse();
- }
-
- public class With_a_convention_event_router_and_registered_aggregate<TEvent>
- {
- protected static ConventionEventRouter<TEvent> router;
- protected static MockAggregate aggregate;
-
- Establish context = () =>
- {
- router = new ConventionEventRouter<TEvent>();
- aggregate = new MockAggregate();
- router.Register(aggregate);
- };
- }
-
- public class MockAggregate : AggregateBase<object>
- {
- public bool ApplyForMessageACalled { get; set; }
- public bool ApplyForMessageBCalled { get; set; }
- public static bool ApplyForMessageCCalled { get; set; }
- public bool ApplyForMessageDCalled { get; set; }
- public bool ApplyForMessageECalled { get; set; }
-
- public void Apply(MessageA message)
- {
- this.ApplyForMessageACalled = true;
- }
-
- protected virtual void Apply(MessageB message)
- {
- this.ApplyForMessageBCalled = true;
- }
-
- public static void Apply(MessageC message)
- {
- ApplyForMessageCCalled = true;
- }
-
- public void Apply(MessageD message, object otherParameter)
- {
- ApplyForMessageCCalled = true;
- }
-
- public int Apply(MessageE message)
- {
- ApplyForMessageCCalled = true;
-
- return 1;
- }
- }
-
- public class MessageA
- {
- }
-
- public class MessageB
- {
- }
-
- public class MessageC
- {
- }
-
- public class MessageD
- {
- }
-
- public class MessageE
- {
- }
-
- public class MessageF
- {
- }
-}
-
-// ReSharper enable InconsistentNaming
-#pragma warning restore 169
View
70 src/tests/CommonDomain.AcceptanceTests/in_the_event_store.cs
@@ -1,70 +0,0 @@
-#pragma warning disable 169
-// ReSharper disable InconsistentNaming
-
-namespace CommonDomain.AcceptanceTests
-{
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Core;
- using EventStore;
- using EventStore.Dispatcher;
- using EventStore.Persistence;
- using Machine.Specifications;
- using Persistence;
- using Persistence.EventStore;
-
- public class in_the_event_store
- {
- protected static IRepository repository;
- protected static ICollection<IDomainEvent> publishedEvents;
- protected static IStoreEvents eventStore;
- protected static IPersistStreams engine;
-
- Establish context = () =>
- {
- engine = new InMemoryPersistenceEngine();
- engine.Initialize();
-
- publishedEvents = new List<IDomainEvent>();
-
- eventStore = new OptimisticEventStore(engine, new SynchronousDispatcher(new FakeBus(publishedEvents), engine));
-
- repository = new EventStoreRepository(eventStore, new AggregateFactory(), new ConflictDetector());
- };
- }
-
- internal class AggregateFactory : IConstructAggregates
- {
- public IAggregate Build(Type type, Guid id, IMemento snapshot)
- {
- return Activator.CreateInstance(type, id) as IAggregate; // todo
- }
- }
-
- public class FakeBus : IPublishMessages
- {
- readonly ICollection<IDomainEvent> domainEvents;
-
- public FakeBus(ICollection<IDomainEvent> domainEvents)
- {
- this.domainEvents = domainEvents;
- }
-
- public void Dispose()
- {
- }
-
- public void Publish(Commit commit)
- {
- commit.Events.ToList().ForEach(e => this.domainEvents.Add(e.Body as IDomainEvent));
- }
- }
-
- public interface IDomainEvent
- {
- }
-}
-
-// ReSharper enable InconsistentNaming
-#pragma warning restore 169

0 comments on commit df9906a

Please sign in to comment.