public ReflectingEventDispatcher(
     IServiceLocator serviceLocator,
     IImplementingTypesService implementingTypesService)
 {
     this.serviceLocator = serviceLocator;
     this.implementingTypesService = implementingTypesService;
 }
        public override void Load()
        {
            this.Bind<IServiceLocator>().To<NinjectServiceLocator>();

            this.Bind<ICommandBus>().To<SynchronousCommandBus>();
            this.Bind<IEventBus>().To<SynchronousEventBus>();
            this.Bind<IObjectValidator>().To<DataAnnotationsObjectValidator>().InSingletonScope();

            this.Bind<ICommandDispatcher>().To<ReflectingCommandDispatcher>().InSingletonScope();
            this.Bind<IEventDispatcher>().To<ReflectingEventDispatcher>().InSingletonScope();

            this.Bind<ITypeRegistry>().To<DomainScanningTypeRegistry>().InSingletonScope();

            var service = new TypeFilteringService(this.Kernel.Get<ITypeRegistry>());
            this.Bind<IImplementingTypesService>().ToConstant(service);

            this.Bind<IStore>().To<InMemoryStore>().InSingletonScope();

            this.implementingTypesService = this.Kernel.Get<IImplementingTypesService>();

            this.BindCommandHandlers();

            this.BindEventHandlers();

            this.BindRules();
        }