Beispiel #1
0
 // ConfigureContainer is where you can register things directly
 // with Autofac. This runs after ConfigureServices so the things
 // here will override registrations made in ConfigureServices.
 // Don't build the container; that gets done for you by the factory.
 public void ConfigureContainer(ContainerBuilder builder)
 {
     // Register your own things directly with Autofac here. Don't
     // call builder.Populate(), that happens in AutofacServiceProviderFactory
     // for you.
     _claptrapBootstrapper.Boot(builder);
 }
Beispiel #2
0
 // ConfigureContainer is where you can register things directly
 // with Autofac. This runs after ConfigureServices so the things
 // here will override registrations made in ConfigureServices.
 // Don't build the container; that gets done for you by the factory.
 public void ConfigureContainer(ContainerBuilder builder)
 {
     // Register your own things directly with Autofac here. Don't
     // call builder.Populate(), that happens in AutofacServiceProviderFactory
     // for you.
     builder.RegisterType <Account>()
     .AsSelf()
     .InstancePerDependency();
     builder.RegisterType <AccountBalanceMinion>()
     .AsSelf()
     .InstancePerDependency();
     builder.RegisterModule <StorageSetupModule>();
     builder.RegisterModule <StorageTestWebApiModule>();
     _claptrapBootstrapper.Boot(builder);
 }