Documentation Coverage Report
Current view: top level - Akka.Net/Cqrs.Akka.Tests.Unit/Events/Handlers - HelloWorldSaidEventHandler.cs Hit Total Coverage
Version: 2.2 Artefacts: 3 3 100.0 %
Date: 2017-09-22

          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 Cqrs.Akka.Commands;
      11             : using Cqrs.Akka.Tests.Unit.Commands;
      12             : using Cqrs.Commands;
      13             : using Cqrs.Events;
      14             : 
      15             : namespace Cqrs.Akka.Tests.Unit.Events.Handlers
      16             : {
      17             :         /// <summary>
      18             :         /// Handles the <see cref="HelloWorldSaid"/>.
      19             :         /// </summary>
      20             :         public class HelloWorldSaidEventHandler
      21             :                 : IEventHandler<Guid, HelloWorldSaid>
      22           1 :         {
      23             :                 /// <summary>
      24             :                 /// Instantiates a new instance of <see cref="HelloWorldSaidEventHandler"/>.
      25             :                 /// </summary>
      26           1 :                 public HelloWorldSaidEventHandler(IAkkaCommandPublisher<Guid> commandBus)
      27             :                 {
      28             :                         CommandBus = commandBus;
      29             :                 }
      30             : 
      31             :                 /// <summary>
      32             :                 /// Publish any <see cref="ICommand{TAuthenticationToken}"/> instances that you want to send with this.
      33             :                 /// </summary>
      34             :                 protected ICommandPublisher<Guid> CommandBus { get; private set; }
      35             : 
      36             :                 #region Implementation of IMessageHandler<in HelloWorldSaid>
      37             : 
      38             :                 /// <summary>
      39             :                 /// Responds to the provided <paramref name="message"/>.
      40             :                 /// </summary>
      41             :                 /// <param name="message">The <see cref="ReplyToHelloWorldCommand"/> to respond to or "handle"</param>
      42           1 :                 public void Handle(HelloWorldSaid message)
      43             :                 {
      44             :                         CommandBus.Publish(new ReplyToHelloWorldCommand {Id = message.Id});
      45             :                         AkkaUnitTests.Step1Reached[message.CorrelationId] = true;
      46             :                 }
      47             : 
      48             :                 #endregion
      49             :         }
      50             : }

Generated by: LCOV version 1.10