LCOV - code coverage report
Current view: top level - Ninject/Azure/Cqrs.Ninject.Azure.ServiceBus.CommandBus/Configuration - AzureQueuedCommandBusReceiverModule.cs Hit Total Coverage
Test: doc-coverage.info Lines: 1 2 50.0 %
Date: 2017-07-26

          Line data    Source code
       1             : using System.Linq;
       2             : using Cqrs.Azure.ServiceBus;
       3             : 
       4             : namespace Cqrs.Ninject.Azure.ServiceBus.CommandBus.Configuration
       5             : {
       6             :         public class AzureQueuedCommandBusReceiverModule<TAuthenticationToken> : AzureCommandBusReceiverModule<TAuthenticationToken>
       7           0 :         {
       8             :                 /// <summary>
       9             :                 /// Loads the module into the kernel.
      10             :                 /// </summary>
      11           1 :                 public override void Load()
      12             :                 {
      13             :                         bool isMessageSerialiserBound = Kernel.GetBindings(typeof(IAzureBusHelper<TAuthenticationToken>)).Any();
      14             :                         if (!isMessageSerialiserBound)
      15             :                         {
      16             :                                 Bind<IAzureBusHelper<TAuthenticationToken>>()
      17             :                                         .To<AzureBusHelper<TAuthenticationToken>>()
      18             :                                         .InSingletonScope();
      19             :                         }
      20             : 
      21             :                         var bus = GetOrCreateBus<AzureQueuedCommandBusReceiver<TAuthenticationToken>>();
      22             : 
      23             :                         RegisterCommandReceiver(bus);
      24             :                         RegisterCommandHandlerRegistrar(bus);
      25             :                         RegisterCommandMessageSerialiser();
      26             :                 }
      27             :         }
      28             : }

Generated by: LCOV version 1.10