Skip to content

Commit

Permalink
Reverted the way IDocumentSerializer is used
Browse files Browse the repository at this point in the history
due to Issue: #42 it's probably better at this tage to keep the
compatibility with the past regarding how the events are serialized in a
commit. We should rethink the whole usage of IDocumentSerializer.
  • Loading branch information
AGiorgetti committed Aug 3, 2016
1 parent f5fccb7 commit d4e28fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/NEventStore.Persistence.MongoDB/ExtensionMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static BsonDocument ToMongoCommit(this CommitAttempt commit, Int64 checkp
new BsonDocument
{
{MongoCommitFields.StreamRevision, streamRevision++},
{MongoCommitFields.Payload, BsonDocumentWrapper.Create(serializer.Serialize(e))}
{MongoCommitFields.Payload, BsonDocumentWrapper.Create(typeof(EventMessage), serializer.Serialize(e))}
}).ToList();

var mc = new MongoCommit
Expand Down Expand Up @@ -76,7 +76,7 @@ public static BsonDocument ToEmptyCommit(this CommitAttempt commit, Int64 checkp
new BsonDocument
{
{MongoCommitFields.StreamRevision, streamRevision++},
{MongoCommitFields.Payload, BsonDocumentWrapper.Create(serializer.Serialize(e))}
{MongoCommitFields.Payload, BsonDocumentWrapper.Create(typeof(EventMessage), serializer.Serialize(e))}
});

var mc = new MongoCommit
Expand Down Expand Up @@ -107,7 +107,7 @@ public static BsonDocument ToMongoCommit_original(this CommitAttempt commit, Int
new BsonDocument
{
{MongoCommitFields.StreamRevision, streamRevision++},
{MongoCommitFields.Payload, BsonDocumentWrapper.Create(serializer.Serialize(e))}
{MongoCommitFields.Payload, BsonDocumentWrapper.Create(typeof(EventMessage), serializer.Serialize(e))}
});

//var dictionarySerialize = new DictionaryInterfaceImplementerSerializer<Dictionary<string, object>>(DictionaryRepresentation.ArrayOfArrays);
Expand Down

2 comments on commit d4e28fd

@ProximoBuild
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity NEventStore :: MongoDB :: Build Build 6.0.0-unstable.73 outcome was SUCCESS
Summary: Tests passed: 80 Build time: 00:02:36

@ProximoBuild
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity NEventStore :: MongoDB :: Build Build 6.0.0-unstable.73 outcome was SUCCESS
Summary: Tests passed: 80 Build time: 00:02:36

Please sign in to comment.