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.Messages;
14 :
15 : namespace Cqrs.Azure.ServiceBus.Tests.Unit
16 : {
17 : /// <summary>
18 : /// A Test <see cref="ICommand{TAuthenticationToken}"/>.
19 : /// </summary>
20 : [Serializable]
21 : [DataContract]
22 : public class TestCommand
23 : : ICommand<Guid>
24 1 : {
25 : #region Implementation of IMessageWithAuthenticationToken<Guid>
26 :
27 : /// <summary>
28 : /// The authentication token of the entity that triggered the event to be raised.
29 : /// </summary>
30 : [DataMember]
31 : public Guid AuthenticationToken { get; set; }
32 :
33 : #endregion
34 :
35 : #region Implementation of ICommand<Guid>
36 :
37 : /// <summary>
38 : /// The identifier of the command itself.
39 : /// </summary>
40 : [DataMember]
41 : public Guid Id { get; set; }
42 :
43 : /// <summary>
44 : /// The expected version number.
45 : /// </summary>
46 : [DataMember]
47 : public int ExpectedVersion { get; set; }
48 :
49 : #endregion
50 :
51 : #region Implementation of IMessage
52 :
53 : /// <summary>
54 : /// 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.
55 : /// </summary>
56 : [DataMember]
57 : public Guid CorrelationId { get; set; }
58 :
59 : /// <summary>
60 : /// The originating framework this message was sent from.
61 : /// </summary>
62 : [DataMember]
63 : public string OriginatingFramework { get; set; }
64 :
65 : /// <summary>
66 : /// The frameworks this <see cref="IMessage"/> has been delivered to/sent via already.
67 : /// </summary>
68 : [DataMember]
69 : public IEnumerable<string> Frameworks { get; set; }
70 :
71 : #endregion
72 : }
73 : }
|