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