LCOV - code coverage report
Current view: top level - Cqrs/Commands - DtoCommandHandler.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 3 0.0 %
Date: 2017-07-26

          Line data    Source code
       1             : #region Copyright
       2             : // // -----------------------------------------------------------------------
       3             : // // <copyright company="cdmdotnet Limited">
       4             : // //   Copyright cdmdotnet Limited. All rights reserved.
       5             : // // </copyright>
       6             : // // -----------------------------------------------------------------------
       7             : #endregion
       8             : 
       9             : using Cqrs.Domain;
      10             : 
      11             : namespace Cqrs.Commands
      12             : {
      13             :         public class DtoCommandHandler<TAuthenticationToken, TDto> : ICommandHandler<TAuthenticationToken, DtoCommand<TAuthenticationToken, TDto>>
      14             :                 where TDto : IDto
      15           0 :         {
      16             :                 private IUnitOfWork<TAuthenticationToken> UnitOfWork { get; set; }
      17             : 
      18           0 :                 public DtoCommandHandler(IUnitOfWork<TAuthenticationToken> unitOfWork)
      19             :                 {
      20             :                         UnitOfWork = unitOfWork;
      21             :                 }
      22             : 
      23             :                 #region Implementation of IMessageHandler<in DtoCommand<UserDto>>
      24             : 
      25           0 :                 public void Handle(DtoCommand<TAuthenticationToken, TDto> message)
      26             :                 {
      27             :                         var item = new DtoAggregateRoot<TAuthenticationToken, TDto>(message.Id, message.Original, message.New);
      28             :                         UnitOfWork.Add(item);
      29             :                         UnitOfWork.Commit();
      30             :                 }
      31             : 
      32             :                 #endregion
      33             :         }
      34             : }

Generated by: LCOV version 1.10