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 System.Collections.Generic;
11 : using System.Runtime.Serialization;
12 : using Cqrs.Commands;
13 : using Cqrs.Domain;
14 : using Cqrs.Messages;
15 :
16 : namespace Cqrs.Akka.Tests.Unit.Commands
17 : {
18 : /// <summary>
19 : /// Someone wants to reply to someone saying "Hello World".
20 : /// </summary>
21 : public class ReplyToHelloWorldCommand : ICommand<Guid>
22 1 : {
23 : #region Implementation of IMessage
24 :
25 : /// <summary>
26 : /// An identifier used to group together several <see cref="IMessage"/>. Any <see cref="IMessage"/> with the same <see cref="CorrelationId"/> were triggered by the same initiating request.
27 : /// </summary>
28 : [DataMember]
29 : public Guid CorrelationId { get; set; }
30 :
31 : /// <summary>
32 : /// The originating framework this message was sent from.
33 : /// </summary>
34 : [DataMember]
35 : public string OriginatingFramework { get; set; }
36 :
37 : /// <summary>
38 : /// The frameworks this <see cref="IMessage"/> has been delivered to/sent via already.
39 : /// </summary>
40 : [DataMember]
41 : public IEnumerable<string> Frameworks { get; set; }
42 :
43 : #endregion
44 :
45 : #region Implementation of IMessageWithAuthenticationToken<Guid>
46 :
47 : /// <summary>
48 : /// The authentication token of the entity that triggered the event to be raised.
49 : /// </summary>
50 : [DataMember]
51 : public Guid AuthenticationToken { get; set; }
52 :
53 : #endregion
54 :
55 : #region Implementation of ICommand<Guid>
56 :
57 : /// <summary>
58 : /// The identifier of the command itself.
59 : /// In some cases this may be the <see cref="IAggregateRoot{TAuthenticationToken}"/> or <see cref="ISaga{TAuthenticationToken}"/> this command targets.
60 : /// </summary>
61 : [DataMember]
62 : public Guid Id { get; set; }
63 :
64 : /// <summary>
65 : /// The expected version number the targeted <see cref="IAggregateRoot{TAuthenticationToken}"/> or <see cref="ISaga{TAuthenticationToken}"/> is expected to be.
66 : /// </summary>
67 : [DataMember]
68 : public int ExpectedVersion { get; set; }
69 :
70 : #endregion
71 : }
72 : }
|