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 Akka.Actor;
11 : using Cqrs.Akka.Domain;
12 : using Cqrs.Commands;
13 : using Cqrs.Domain;
14 :
15 : namespace Cqrs.Akka.Tests.Unit.Commands.Handlers
16 : {
17 : /// <summary>
18 : /// Handles the <see cref="UpdateCompletedConversationReportCommand"/>.
19 : /// </summary>
20 : public class UpdateCompletedConversationReportCommandHandler
21 : : ICommandHandler<Guid, UpdateCompletedConversationReportCommand>
22 1 : {
23 : /// <summary>
24 : /// Instantiates the <see cref="SayHelloWorldCommandHandler"/> class registering any <see cref="ReceiveActor.Receive{T}(System.Func{T,System.Threading.Tasks.Task})"/> required.
25 : /// </summary>
26 1 : public UpdateCompletedConversationReportCommandHandler(IAkkaAggregateResolver aggregateResolver)
27 : {
28 : AggregateResolver = aggregateResolver;
29 : }
30 :
31 : /// <summary>
32 : /// Resolves Akka.Net actor based <see cref="IAggregateRoot{TAuthenticationToken}"/>
33 : /// </summary>
34 : protected IAkkaAggregateResolver AggregateResolver { get; private set; }
35 :
36 : #region Implementation of IMessageHandler<in UpdateCompletedConversationReportCommand>
37 :
38 : /// <summary>
39 : /// Responds to the provided <paramref name="command"/>.
40 : /// </summary>
41 : /// <param name="command">The <see cref="UpdateCompletedConversationReportCommand"/> to respond to or "handle"</param>
42 1 : public void Handle(UpdateCompletedConversationReportCommand command)
43 : {
44 : AkkaUnitTests.FinalCommandReached[command.CorrelationId] = true;
45 : }
46 :
47 : #endregion
48 : }
49 : }
|