Commit 16c764c

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-03-24 20:29:38
trying to register presenters as an IPresenter using autofac.
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@99 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent d3da9f1
Changed files (2)
trunk
product
trunk/product/MyMoney/boot/container/registration/wire_up_the_presentation_modules.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Linq;
 using System.Reflection;
 using MoMoney.Infrastructure.Container.Windsor;
 using MoMoney.Presentation.Core;
@@ -22,13 +21,15 @@ namespace MoMoney.boot.container.registration
             Assembly
                 .GetExecutingAssembly()
                 .GetTypes()
-                .Where(x => typeof (IPresentationModule).IsAssignableFrom(x))
+                //.Where(x => typeof (IPresentationModule).IsAssignableFrom(x))
+                .where(x => typeof (IPresenter).IsAssignableFrom(x))
+                .where(x => !x.IsInterface)
                 .each(register);
         }
 
         void register(Type type)
         {
-            registry.transient(type.last_interface(), type);
+            registry.transient(typeof (IPresenter), type);
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/boot/container/wire_up_the_container.cs
@@ -24,7 +24,7 @@ namespace MoMoney.boot.container
                 .then(new wire_up_the_infrastructure_in_to_the(registry))
                 .then(new wire_up_the_mappers_in_to_the(registry))
                 .then(new wire_up_the_services_in_to_the(registry))
-                //.then(new wire_up_the_presentation_modules(registry))
+                .then(new wire_up_the_presentation_modules(registry))
                 .then(new wire_up_the_views_in_to_the(registry))
                 .then(new wire_up_the_reports_in_to_the(registry))
                 //.then(new run_mass_component_registration_in_to_the(container, specification, configuration))