LCOV - code coverage report
Current view: top level - Ninject/Cqrs.Ninject/Configuration - MemoryCacheEventStoreModule.cs Hit Total Coverage
Test: doc-coverage.info Lines: 5 5 100.0 %
Date: 2017-07-26

          Line data    Source code
       1             : using Cqrs.Events;
       2             : using Ninject.Modules;
       3             : 
       4             : namespace Cqrs.Ninject.Configuration
       5             : {
       6             :         /// <summary>
       7             :         /// The <see cref="INinjectModule"/> for use with the Cqrs package.
       8             :         /// </summary>
       9             :         public class MemoryCacheEventStoreModule<TAuthenticationToken> : NinjectModule
      10           1 :         {
      11             :                 #region Overrides of NinjectModule
      12             : 
      13             :                 /// <summary>
      14             :                 /// Loads the module into the kernel.
      15             :                 /// </summary>
      16           1 :                 public override void Load()
      17             :                 {
      18             :                         RegisterFactories();
      19             :                         RegisterServices();
      20             :                         RegisterCqrsRequirements();
      21             :                 }
      22             : 
      23             :                 #endregion
      24             : 
      25             :                 /// <summary>
      26             :                 /// Register the all factories
      27             :                 /// </summary>
      28           1 :                 public virtual void RegisterFactories()
      29             :                 {
      30             :                         Bind<IEventBuilder<TAuthenticationToken>>()
      31             :                                 .To<DefaultEventBuilder<TAuthenticationToken>>()
      32             :                                 .InSingletonScope();
      33             :                         Bind<IEventDeserialiser<TAuthenticationToken>>()
      34             :                                 .To<EventDeserialiser<TAuthenticationToken>>()
      35             :                                 .InSingletonScope();
      36             :                 }
      37             : 
      38             :                 /// <summary>
      39             :                 /// Register the all services
      40             :                 /// </summary>
      41           1 :                 public virtual void RegisterServices()
      42             :                 {
      43             :                 }
      44             : 
      45             :                 /// <summary>
      46             :                 /// Register the all Cqrs command handlers
      47             :                 /// </summary>
      48           1 :                 public virtual void RegisterCqrsRequirements()
      49             :                 {
      50             :                         Bind<IEventStore<TAuthenticationToken>>()
      51             :                                 .To<MemoryCacheEventStore<TAuthenticationToken>>()
      52             :                                 .InSingletonScope();
      53             :                 }
      54             :         }
      55             : }

Generated by: LCOV version 1.10