LCOV - code coverage report
Current view: top level - Akka.Net/Cqrs.Akka/Domain - AkkaSagaProxy.cs Hit Total Coverage
Test: doc-coverage.info Lines: 0 4 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 System;
      10             : using System.Collections.Generic;
      11             : using Akka.Actor;
      12             : using Cqrs.Akka.Domain.Commands;
      13             : using Cqrs.Domain;
      14             : using Cqrs.Events;
      15             : 
      16             : namespace Cqrs.Akka.Domain
      17             : {
      18             :         public class AkkaSagaProxy<TAuthenticationToken, TSaga>
      19             :                 : IAkkaSagaProxy<TSaga>
      20             :                 , ISaga<TAuthenticationToken>
      21             :                 // TODO think about if this is necessary again.
      22             :                 // where TSaga : ISaga<TAuthenticationToken>
      23           0 :         {
      24             :                 public IActorRef ActorReference { get; internal set; }
      25             : 
      26             :                 public TSaga Saga { get; protected set; }
      27             : 
      28             :                 #region Implementation of ISaga<TAuthenticationToken>
      29             : 
      30             :                 public virtual Guid Id
      31             :                 {
      32             :                         get { return ActorReference.Ask<Guid>(new GetAkkaSagaId()).Result; }
      33             :                 }
      34             : 
      35             :                 public virtual int Version
      36             :                 {
      37             :                         get { return ActorReference.Ask<int>(new GetAkkaSagaVersion()).Result; }
      38             :                 }
      39             : 
      40           0 :                 public virtual IEnumerable<ISagaEvent<TAuthenticationToken>> GetUncommittedChanges()
      41             :                 {
      42             :                         return ((ISaga<TAuthenticationToken>)Saga).GetUncommittedChanges();
      43             :                 }
      44             : 
      45           0 :                 public virtual void MarkChangesAsCommitted()
      46             :                 {
      47             :                         ((ISaga<TAuthenticationToken>)Saga).MarkChangesAsCommitted();
      48             :                 }
      49             : 
      50           0 :                 public virtual void LoadFromHistory(IEnumerable<ISagaEvent<TAuthenticationToken>> history)
      51             :                 {
      52             :                         ((ISaga<TAuthenticationToken>)Saga).LoadFromHistory(history);
      53             :                 }
      54             : 
      55             :                 #endregion
      56             :         }
      57             : }

Generated by: LCOV version 1.10