protected override void Load(ContainerBuilder builder) { builder.RegisterType <Publisher>().As <IPublisher>(); builder.Register(c => ServiceBusFactory.New(sbc => { IServiceBusConfigurator config = c.Resolve <IServiceBusConfigurator>(); config.Config(c, sbc); })).As <IServiceBus>() .SingleInstance(); //builder.RegisterType<ServiceBusAppEventHandler>().As<IAppEventHandler>(); }