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 System;
10 : using Cqrs.Snapshots;
11 :
12 : namespace Cqrs.Events
13 : {
14 : /// <summary>
15 : /// Builds <see cref="EventData"/> from various input formats.
16 : /// </summary>
17 : public interface ISnapshotBuilder
18 : {
19 : /// <summary>
20 : /// Create an <see cref="EventData">framework event</see> with the provided <paramref name="snapshot"/>.
21 : /// </summary>
22 : /// <param name="snapshot">The <see cref="Snapshot"/> to add to the <see cref="EventData"/>.</param>
23 1 : EventData CreateFrameworkEvent(Snapshot snapshot);
24 :
25 : /// <summary>
26 : /// Create an <see cref="EventData">framework event</see> with the provided <paramref name="snapshot"/>.
27 : /// </summary>
28 : /// <param name="type">The name of the <see cref="Type"/> of the target object the serialised data is.</param>
29 : /// <param name="snapshot">The <see cref="Snapshot"/> to add to the <see cref="EventData"/>.</param>
30 1 : EventData CreateFrameworkEvent(string type, Snapshot snapshot);
31 : }
32 : }
|