Esempio n. 1
0
        public void AutofacContainerRegistryShouldReturnTrueForIsRegisteredOnExistingRegistrations()
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <Service>().As <IService>();
            var container = new MutableContainer(builder);

            var registry = new AutofacContainerRegistry(new ContainerBuilder(), container);

            registry.IsRegistered <IService>().Should().BeTrue();
        }
Esempio n. 2
0
        public void AutofacContainerRegistryShouldReturnTrueForIsRegisteredAfterRegistration()
        {
            var container = new MutableContainer(new ContainerBuilder());

            AutofacContainerRegistry registry = null;

            container.RegisterTypes(b =>
            {
                registry = new AutofacContainerRegistry(b, container);
                registry.Register <IService, Service>();
                registry.FinalizeRegistry();
            });
            registry.IsRegistered <IService>().Should().BeTrue();
        }
 public ConfigureCoreServices(MutableContainer container)
 {
     this.container = container;
 }
 public ConfigureApplicationCommands(MutableContainer container)
 {
     this.container = container;
 }
 public ApplicationStartupItemFactory(string type, MutableContainer container)
 {
     this.type = type;
     this.container = container;
 }