Line data Source code
1 : using System;
2 : using System.Collections.Generic;
3 : using System.Runtime.Serialization;
4 : using Cqrs.Commands;
5 : using Cqrs.Authentication;
6 : using Cqrs.Messages;
7 :
8 : namespace Cqrs.Tests.Substitutes
9 : {
10 : public class TestAggregateDoSomething : ICommand<ISingleSignOnToken>
11 0 : {
12 : public Guid Id { get; set; }
13 :
14 : public int ExpectedVersion { get; set; }
15 :
16 : #region Implementation of IMessageWithAuthenticationToken<ISingleSignOnToken>
17 :
18 : public ISingleSignOnToken AuthenticationToken { get; set; }
19 :
20 : #endregion
21 :
22 : #region Implementation of IMessage
23 :
24 : [DataMember]
25 : public Guid CorrelationId { get; set; }
26 :
27 : /// <summary>
28 : /// The originating framework this message was sent from.
29 : /// </summary>
30 : [DataMember]
31 : public string OriginatingFramework { get; set; }
32 :
33 : /// <summary>
34 : /// The frameworks this <see cref="IMessage"/> has been delivered to/sent via already.
35 : /// </summary>
36 : [DataMember]
37 : public IEnumerable<string> Frameworks { get; set; }
38 :
39 : #endregion
40 : }
41 :
42 : public class TestAggregateDoSomething2 : TestAggregateDoSomething
43 0 : {
44 : }
45 :
46 : public class TestAggregateDoSomething3 : TestAggregateDoSomething
47 0 : {
48 : }
49 :
50 : public class TestAggregateDoSomethingHandler : ICommandHandler<ISingleSignOnToken, TestAggregateDoSomething>
51 0 : {
52 0 : public void Handle(TestAggregateDoSomething message)
53 : {
54 : TimesRun++;
55 : }
56 :
57 : public int TimesRun { get; set; }
58 : }
59 : public class TestAggregateDoSomethingElseHandler : ICommandHandler<ISingleSignOnToken, TestAggregateDoSomething>
60 0 : {
61 0 : public void Handle(TestAggregateDoSomething message)
62 : {
63 :
64 : }
65 : }
66 : }
|