protected virtual void ConfigureLifetimeScope(ContainerBuilder builder) { builder.RegisterAutofacConsumerFactory(); builder.RegisterType<HostBusService>() .InstancePerServiceScope(this) .WithParameter(TypedParameter.From(_serviceName)) .As<ServiceControl>(); }
protected override void ConfigureLifetimeScope(ContainerBuilder builder) { builder.RegisterAutofacConsumerFactory(); builder.Register(GetRetrieveImageSettings) .As<RetrieveImageSettings>() .SingleInstance(); builder.RegisterType<RetrieveImageConsumer>() .AsSelf(); builder.RegisterType<ImageRetrievalConsumerBusInstance>() .As<IServiceBusInstance>(); base.ConfigureLifetimeScope(builder); }
protected override void ConfigureLifetimeScope(ContainerBuilder builder) { builder.RegisterAutofacConsumerFactory(); builder.RegisterType<ScheduleMessageConsumer>() .InstancePerMessageScope(); builder.RegisterType<CancelScheduledMessageConsumer>() .InstancePerMessageScope(); builder.Register(CreateScheduler) .SingleInstance() .As<IScheduler>(); builder.RegisterType<MessageSchedulingConsumerServiceBusInstance>() .As<IServiceBusInstance>(); base.ConfigureLifetimeScope(builder); }