Line data Source code
1 : #region Copyright
2 : // // -----------------------------------------------------------------------
3 : // // <copyright company="Chinchilla Software Limited">
4 : // // Copyright Chinchilla Software Limited. All rights reserved.
5 : // // </copyright>
6 : // // -----------------------------------------------------------------------
7 : #endregion
8 :
9 : using Cqrs.Events;
10 : using Cqrs.Snapshots;
11 :
12 : namespace Cqrs.MongoDB.Serialisers
13 : {
14 : /// <summary>
15 : /// Deserialises <see cref="Snapshot"/> from a serialised state.
16 : /// </summary>
17 : public class MongoDbSnapshotDeserialiser : SnapshotDeserialiser
18 1 : {
19 : #region Overrides of EventDeserialiser<TAuthenticationToken>
20 :
21 : /// <summary>
22 : /// Deserialise the provided <paramref name="eventData"/> into an <see cref="Snapshot"/>.
23 : /// </summary>
24 : /// <param name="eventData">The <see cref="EventData"/> to Deserialise.</param>
25 1 : public override Snapshot Deserialise(EventData eventData)
26 : {
27 : return (Snapshot)eventData.Data;
28 : }
29 :
30 : #endregion
31 : }
32 : }
|