protected override void Load(ContainerBuilder builder)
        {
            // The generic ILogger<TCategoryName> service was added to the ServiceCollection by ASP.NET Core.
            // It was then registered with Autofac using the Populate method in ConfigureServices.
            builder.RegisterType <SerilogLogger>().As <ILog>();
            builder.RegisterType <ExceptionHandlingMiddleware>();
            builder.RegisterType <MongoDatabaseFactory>().As <IMongoDatabaseFactory>();
            builder.RegisterType <AppointmentService>().As <IAppointmentService>();
            builder.RegisterType <InMemoryEventBusSubscriptionsManager>().As <IEventBusSubscriptionsManager>();
            builder.RegisterType <IntegrationTestEventHandler>().As <IIntegrationEventHandler>();
            // builder.RegisterType<SagaUpdater<AppointmentAggregate, AppointmentId, AppointmentBookedEvent, AppointmentSaga>>().As<ISagaUpdater<AppointmentAggregate, AppointmentId, AppointmentBookedEvent, AppointmentSaga>>();
            builder.RegisterType <OrdersApplicationService>().As <IOrdersApplicationService>();
            builder.RegisterType <PaymentsApplicationService>().As <IPaymentsApplicationService>();
            builder.RegisterType <PaymentProviderFactory>().As <IPaymentProviderFactory>();
            builder.RegisterType <Payments.Domain.Payments.Providers.ConfigurationProvider>().As <Payments.Domain.Payments.Providers.IConfigurationProvider>();
            builder.RegisterType <TestProvider1PaymentProvider>().As <IPaymentProvider>();
            builder.RegisterType <ReadModelFactory <AppointmentReadModel> >().As <IReadModelFactory <AppointmentReadModel> >();
            builder.RegisterType <ReadModelFactory <AppointmentInsertReadModel> >().As <IReadModelFactory <AppointmentInsertReadModel> >();
            builder.RegisterType <AggregateReadStoreManager <AppointmentAggregate, AppointmentId, MongoDbReadModelStore <AppointmentReadModel>, AppointmentReadModel> >();
            ISnapshotStrategy newStrategy = SnapshotEveryFewVersionsStrategy.With(10);

            builder.RegisterInstance(newStrategy);
            // builder.RegisterType<EventFlowOptionsSnapshotExtensions>
            builder.Populate(new ServiceCollection());

            KafkaServicesRegistration.Register(builder);
        }
 protected override void Load(ContainerBuilder builder)
 {
     KafkaServicesRegistration.Register(builder);
     builder.RegisterAssemblyTypes(typeof(ScheduleConfirmedEvent).GetTypeInfo().Assembly)
     .AsClosedTypesOf(typeof(IIntegrationEventHandler <>));
 }