Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="cdmdotnet Limited">
4 : // // Copyright cdmdotnet Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using System;
10 : using System.Runtime.Serialization;
11 : using Cqrs.Events;
12 : using MongoDB.Bson;
13 :
14 : namespace Cqrs.MongoDB.Events
15 : {
16 : [Serializable]
17 : [DataContract]
18 : public class MongoDbEventData : EventData
19 0 : {
20 : [DataMember]
21 : // ReSharper disable InconsistentNaming
22 : public ObjectId _id { get; set; }
23 : // ReSharper restore InconsistentNaming
24 :
25 :
26 0 : public MongoDbEventData() { }
27 :
28 0 : public MongoDbEventData(EventData eventData)
29 : {
30 : AggregateRsn = eventData.AggregateRsn;
31 : CorrelationId = eventData.CorrelationId;
32 : AggregateId = eventData.AggregateId;
33 : Data = eventData.Data;
34 : EventId = eventData.EventId;
35 : EventType = eventData.EventType;
36 : Timestamp = eventData.Timestamp;
37 : Version = eventData.Version;
38 : }
39 : }
40 : }
|