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