Documentation Coverage Report
Current view: top level - Ninject/Azure/Cqrs.Ninject.Azure.BlobStorage/Configuration - BlobStoragEventStoreModule.cs Hit Total Coverage
Version: 2.2 Artefacts: 5 5 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.Azure.BlobStorage;
      11             : using Cqrs.Azure.BlobStorage.Events;
      12             : using Cqrs.Events;
      13             : using Ninject.Modules;
      14             : 
      15             : namespace Cqrs.Ninject.Azure.BlobStorage.Configuration
      16             : {
      17             :         /// <summary>
      18             :         /// A <see cref="INinjectModule"/> that wires up the prerequisites of <see cref="IEventStore{TAuthenticationToken}"/> with blob storage.
      19             :         /// </summary>
      20             :         /// <typeparam name="TAuthenticationToken">The <see cref="Type"/> of the authentication token.</typeparam>
      21             :         public class BlobStoragEventStoreModule<TAuthenticationToken> : NinjectModule
      22           1 :         {
      23             :                 #region Overrides of NinjectModule
      24             : 
      25             :                 /// <summary>
      26             :                 /// Loads the module into the kernel.
      27             :                 /// </summary>
      28           1 :                 public override void Load()
      29             :                 {
      30             :                         RegisterFactories();
      31             :                         RegisterEventSerialisationConfiguration();
      32             :                         RegisterEventStore();
      33             :                 }
      34             : 
      35             :                 #endregion
      36             : 
      37             :                 /// <summary>
      38             :                 /// Register the all factories
      39             :                 /// </summary>
      40           1 :                 public virtual void RegisterFactories()
      41             :                 {
      42             :                         Bind<IBlobStorageStoreConnectionStringFactory>()
      43             :                                 .To<BlobStorageEventStoreConnectionStringFactory>()
      44             :                                 .InSingletonScope();
      45             :                 }
      46             : 
      47             :                 /// <summary>
      48             :                 /// Register the all event serialisation configurations
      49             :                 /// </summary>
      50           1 :                 public virtual void RegisterEventSerialisationConfiguration()
      51             :                 {
      52             :                         Bind<IEventBuilder<TAuthenticationToken>>()
      53             :                                 .To<DefaultEventBuilder<TAuthenticationToken>>()
      54             :                                 .InSingletonScope();
      55             :                         Bind<IEventDeserialiser<TAuthenticationToken>>()
      56             :                                 .To<EventDeserialiser<TAuthenticationToken>>()
      57             :                                 .InSingletonScope();
      58             :                 }
      59             : 
      60             :                 /// <summary>
      61             :                 /// Register the <see cref="IEventStore{TAuthenticationToken}"/>
      62             :                 /// </summary>
      63           1 :                 public virtual void RegisterEventStore()
      64             :                 {
      65             :                 }
      66             :         }
      67             : }

Generated by: LCOV version 1.10