main
1using Gorilla.Commons.Infrastructure.Container;
2using gorilla.commons.infrastructure.thirdparty;
3using gorilla.commons.infrastructure.thirdparty.Autofac;
4using gorilla.commons.utility;
5using MoMoney.boot.container.registration;
6
7namespace MoMoney.boot.container
8{
9 class wire_up_the_container : Command
10 {
11 readonly DependencyRegistration registry;
12
13 public wire_up_the_container() : this(new AutofacDependencyRegistryBuilder()) {}
14
15 public wire_up_the_container(DependencyRegistration registry)
16 {
17 this.registry = registry;
18 }
19
20 public void run()
21 {
22 new auto_wire_components_in_to_the(registry)
23 .then(new wire_up_the_essential_services_into_the(registry))
24 .then(new wire_up_the_data_access_components_into_the(registry))
25 .then(new wire_up_the_infrastructure_in_to_the(registry))
26 .then(new wire_up_the_mappers_in_to_the(registry))
27 .then(new wire_up_the_services_in_to_the(registry))
28 .then(new wire_up_the_presentation_modules(registry))
29 .then(new wire_up_the_views_in_to_the(registry))
30 .then(new wire_up_the_reports_in_to_the(registry))
31 .run();
32
33 Resolve.initialize_with(registry.build());
34 }
35 }
36}