LCOV - code coverage report
Current view: top level - Cqrs/Commands - DtoCommand.cs Hit Total Coverage
Test: doc-coverage.info Lines: 1 2 50.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 System;
      10             : using System.Collections.Generic;
      11             : using System.Runtime.Serialization;
      12             : using Cqrs.Domain;
      13             : using Cqrs.Messages;
      14             : 
      15             : namespace Cqrs.Commands
      16             : {
      17             :         /// <summary>
      18             :         /// A <see cref="ICommand{TPermissionToken}"/> for <see cref="IDto"/> objects
      19             :         /// </summary>
      20             :         [Serializable]
      21             :         [DataContract]
      22             :         public class DtoCommand<TAuthenticationToken, TDto> : ICommand<TAuthenticationToken>
      23             :                 where TDto : IDto
      24           1 :         {
      25             :                 [DataMember]
      26             :                 public TDto Original { get; set; }
      27             : 
      28             :                 [DataMember]
      29             :                 public TDto New { get; set; }
      30             : 
      31           0 :                 public DtoCommand(Guid id, TDto original, TDto @new)
      32             :                 {
      33             :                         Id = id;
      34             :                         Original = original;
      35             :                         New = @new;
      36             :                 }
      37             : 
      38             :                 [DataMember]
      39             :                 public Guid Id { get; set; }
      40             : 
      41             :                 [DataMember]
      42             :                 public int ExpectedVersion { get; set; }
      43             : 
      44             :                 #region Implementation of IMessageWithAuthenticationToken<TAuthenticationToken>
      45             : 
      46             :                 [DataMember]
      47             :                 public TAuthenticationToken AuthenticationToken { get; set; }
      48             : 
      49             :                 #endregion
      50             : 
      51             :                 #region Implementation of IMessage
      52             : 
      53             :                 [DataMember]
      54             :                 public Guid CorrelationId { get; set; }
      55             : 
      56             :                 [DataMember]
      57             :                 [Obsolete("Use Frameworks, It's far more flexible and OriginatingFramework")]
      58             :                 public FrameworkType Framework { get; set; }
      59             : 
      60             :                 /// <summary>
      61             :                 /// The originating framework this message was sent from.
      62             :                 /// </summary>
      63             :                 [DataMember]
      64             :                 public string OriginatingFramework { get; set; }
      65             : 
      66             :                 /// <summary>
      67             :                 /// The frameworks this <see cref="IMessage"/> has been delivered to/sent via already.
      68             :                 /// </summary>
      69             :                 [DataMember]
      70             :                 public IEnumerable<string> Frameworks { get; set; }
      71             : 
      72             :                 [Obsolete("Use CorrelationId")]
      73             :                 [DataMember]
      74             :                 public Guid CorrolationId
      75             :                 {
      76             :                         get { return CorrelationId; }
      77             :                         set { CorrelationId = value; }
      78             :                 }
      79             : 
      80             :                 #endregion
      81             :         }
      82             : }

Generated by: LCOV version 1.10