Commit 06e37f3

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-03-21 03:14:00
cleaning up how components are registered with the container.
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@92 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 926459c
trunk/product/MyMoney/boot/container/registration/run_mass_component_registration_in_to_the.cs
@@ -5,7 +5,7 @@ using MoMoney.Infrastructure.Container.Windsor;
 using MoMoney.Infrastructure.Container.Windsor.configuration;
 using MoMoney.Utility.Core;
 
-namespace MoMoney.boot.container
+namespace MoMoney.boot.container.registration
 {
     internal class run_mass_component_registration_in_to_the : ICommand
     {
trunk/product/MyMoney/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs
@@ -0,0 +1,27 @@
+using MoMoney.Infrastructure.Container.Windsor;
+using MoMoney.Infrastructure.eventing;
+using MoMoney.Infrastructure.Threading;
+using MoMoney.Infrastructure.transactions;
+using MoMoney.Presentation.Model.Projects;
+using MoMoney.Utility.Core;
+
+namespace MoMoney.boot.container.registration
+{
+    internal class wire_up_the_infrastructure_in_to_the : ICommand
+    {
+        readonly IContainerBuilder registry;
+
+        public wire_up_the_infrastructure_in_to_the(IContainerBuilder registry)
+        {
+            this.registry = registry;
+        }
+
+        public void run()
+        {
+            registry.singleton<IEventAggregator, EventAggregator>();
+            registry.singleton<ITimer, IntervalTimer>();
+            registry.singleton<IUnitOfWorkRegistry, UnitOfWorkRegistry>();
+            registry.singleton<IProject, CurrentProject>();
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/boot/container/registration/wire_up_the_presentation_modules.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Linq;
+using System.Reflection;
+using MoMoney.Infrastructure.Container.Windsor;
+using MoMoney.Presentation.Core;
+using MoMoney.Utility.Core;
+using MoMoney.Utility.Extensions;
+
+namespace MoMoney.boot.container.registration
+{
+    internal class wire_up_the_presentation_modules : ICommand
+    {
+        readonly IContainerBuilder registry;
+
+        public wire_up_the_presentation_modules(IContainerBuilder registry)
+        {
+            this.registry = registry;
+        }
+
+        public void run()
+        {
+            Assembly
+                .GetExecutingAssembly()
+                .GetTypes()
+                .Where(x => typeof (IPresentationModule).IsAssignableFrom(x))
+                .each(register);
+        }
+
+        void register(Type type)
+        {
+            registry.transient(type.last_interface(), type);
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/boot/container/registration/wire_up_the_views_in_to_the.cs
@@ -14,7 +14,7 @@ using MoMoney.Presentation.Views.Startup;
 using MoMoney.Presentation.Views.updates;
 using MoMoney.Utility.Core;
 
-namespace MoMoney.windows.ui
+namespace MoMoney.boot.container.registration
 {
     internal class wire_up_the_views_in_to_the : ICommand
     {
@@ -34,7 +34,7 @@ namespace MoMoney.windows.ui
             register.transient<ISplashScreenView, SplashScreenView>();
             register.transient<INavigationView, NavigationView>();
             register.transient<IAddCompanyView, AddCompanyView>();
-            register.transient<IViewAllBills, view_all_bills>();
+            register.transient<IViewAllBills, ViewAllBills>();
             register.transient<IAddBillPaymentView, add_bill_payment>();
             register.transient<IMainMenuView, MainMenuView>();
             register.transient<IAddNewIncomeView, AddNewIncomeView>();
trunk/product/MyMoney/boot/container/wire_up_the_container.cs
@@ -22,8 +22,10 @@ namespace MoMoney.boot.container
 
             new wire_up_the_essential_services_into_the(registry)
                 .then(new wire_up_the_data_access_components_into_the(registry))
+                .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_views_in_to_the(registry))
+                //.then(new wire_up_the_presentation_modules(registry))
                 .then(new wire_up_the_reports_in_to_the(registry))
                 .then(new run_mass_component_registration_in_to_the(container, specification, configuration))
                 .run();
trunk/product/MyMoney/DataAccess/db40/SessionContext.cs
@@ -13,7 +13,6 @@ namespace MoMoney.DataAccess.db40
         void commit_current_session();
     }
 
-    [Singleton]
     public class SessionContext : ISessionContext
     {
         readonly IConnectionFactory connection_factory;
trunk/product/MyMoney/Infrastructure/Container/Windsor/configuration/SubclassesForm.cs
@@ -7,8 +7,7 @@ namespace MoMoney.Infrastructure.Container.Windsor.configuration
     {
         public bool is_satisfied_by(Type item)
         {
-            return typeof(Form).IsAssignableFrom(item);
-            //return item.IsSubclassOf(typeof (Form));
+            return typeof (Form).IsAssignableFrom(item);
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/Container/Windsor/IContainerBuilder.cs
@@ -6,9 +6,10 @@ namespace MoMoney.Infrastructure.Container.Windsor
 {
     public interface IContainerBuilder
     {
-        void singleton<Interface, Implementation>() where Implementation : Interface;
-        void singleton<Interface>(Interface instanceOfTheInterface);
-        void transient<Interface, Implementation>() where Implementation : Interface;
+        void singleton<Contract, Implementation>() where Implementation : Contract;
+        void singleton<Contract>(Contract instance_of_the_contract);
+        void transient<Contract, Implementation>() where Implementation : Contract;
+        void transient(Type contract, Type implementation);
         void proxy<T>(IConfiguration<IProxyBuilder<T>> configuration, Func<T> target);
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/Container/Windsor/WindsorDependencyRegistry.cs
@@ -32,7 +32,7 @@ namespace MoMoney.Infrastructure.Container.Windsor
             var interface_type = typeof (Interface);
             var implementation_type = typeof (Implementation);
             underlying_container().AddComponent(create_a_key_using(interface_type, implementation_type), interface_type,
-                                              implementation_type);
+                                                implementation_type);
         }
 
         public void singleton<Interface>(Interface instanceOfTheInterface)
@@ -41,10 +41,15 @@ namespace MoMoney.Infrastructure.Container.Windsor
         }
 
         public void transient<Interface, Implementation>() where Implementation : Interface
+        {
+            transient(typeof (Interface), typeof (Implementation));
+        }
+
+        public void transient(Type contract, Type implementation)
         {
             underlying_container().AddComponentLifeStyle(
-                create_a_key_using(typeof (Interface), typeof (Implementation)),
-                typeof (Interface), typeof (Implementation), LifestyleType.Transient);
+                create_a_key_using(contract, implementation),
+                contract, implementation, LifestyleType.Transient);
         }
 
         string create_a_key_using(Type interface_type, Type implementation_type)
trunk/product/MyMoney/Infrastructure/eventing/EventAggregator.cs
@@ -1,7 +1,5 @@
 using System.Collections.Generic;
 using System.Linq;
-using Castle.Core;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Infrastructure.eventing
@@ -13,7 +11,6 @@ namespace MoMoney.Infrastructure.eventing
         void publish<Event>() where Event : IEvent, new();
     }
 
-    [Singleton]
     public class EventAggregator : IEventAggregator
     {
         readonly IDictionary<string, HashSet<object>> subscribers;
@@ -35,7 +32,6 @@ namespace MoMoney.Infrastructure.eventing
         {
             get_list_for<Event>()
                 .Select(x => x.downcast_to<IEventSubscriber<Event>>())
-                //.Select(x => log_and_return(x))
                 .each(x => x.notify(the_event_to_broadcast));
         }
 
@@ -52,11 +48,5 @@ namespace MoMoney.Infrastructure.eventing
             }
             return subscribers[typeof (Event).FullName];
         }
-
-        IEventSubscriber<Event> log_and_return<Event>(IEventSubscriber<Event> x) where Event : IEvent
-        {
-            this.log().debug("publishing event {0} to {1}", typeof (Event).Name, x.GetType().FullName);
-            return x;
-        }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/eventing/EventAggregatorSpecs.cs
@@ -0,0 +1,51 @@
+using developwithpassion.bdd.contexts;
+using MoMoney.Testing.spechelpers.contexts;
+using MoMoney.Testing.spechelpers.core;
+using Rhino.Mocks;
+
+namespace MoMoney.Infrastructure.eventing
+{
+    public class behaves_like_event_aggregator : concerns_for<IEventAggregator, EventAggregator>
+    {
+    }
+
+    public class when_a_event_is_raised_in_the_system : behaves_like_event_aggregator
+    {
+        it should_notify_all_subscribers_of_the_event = () =>
+                                                            {
+                                                                first_subscriber.was_told_to(x => x.notify(message));
+                                                                second_subscriber.was_told_to(x => x.notify(message));
+                                                            };
+
+        it should_not_notify_any_subscribers_that_subscribed_to_a_different_event =
+            () => incorrect_subscriber.was_not_told_to(x => x.notify(Arg<AnotherEvent>.Is.Anything));
+
+        context c = () =>
+                        {
+                            message = new TestEvent();
+                            first_subscriber = an<IEventSubscriber<TestEvent>>();
+                            second_subscriber = an<IEventSubscriber<TestEvent>>();
+                            incorrect_subscriber = an<IEventSubscriber<AnotherEvent>>();
+                        };
+
+        because b = () =>
+                        {
+                            sut.subscribe_to(first_subscriber);
+                            sut.subscribe_to(second_subscriber);
+                            sut.publish(message);
+                        };
+
+        static TestEvent message;
+        static IEventSubscriber<TestEvent> first_subscriber;
+        static IEventSubscriber<TestEvent> second_subscriber;
+        static IEventSubscriber<AnotherEvent> incorrect_subscriber;
+    }
+
+    public class TestEvent : IEvent
+    {
+    }
+
+    public class AnotherEvent : IEvent
+    {
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/Threading/IntervalTimer.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Timers;
-using Castle.Core;
 
 namespace MoMoney.Infrastructure.Threading
 {
@@ -11,11 +10,10 @@ namespace MoMoney.Infrastructure.Threading
         void stop_notifying(ITimerClient client_to_stop_notifying);
     }
 
-    [Singleton]
     public class IntervalTimer : ITimer
     {
-        private readonly ITimerFactory factory;
-        private readonly IDictionary<ITimerClient, Timer> timers;
+        readonly ITimerFactory factory;
+        readonly IDictionary<ITimerClient, Timer> timers;
 
         public IntervalTimer(ITimerFactory factory)
         {
trunk/product/MyMoney/Infrastructure/transactions/UnitOfWorkRegistry.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using Castle.Core;
 using MoMoney.Domain.Core;
 using MoMoney.Utility.Extensions;
 
@@ -14,7 +13,6 @@ namespace MoMoney.Infrastructure.transactions
         bool has_changes_to_commit();
     }
 
-    [Singleton]
     public class UnitOfWorkRegistry : IUnitOfWorkRegistry
     {
         readonly IUnitOfWorkFactory factory;
trunk/product/MyMoney/Presentation/Model/Menu/File/Commands/NewCommandSpecs.cs
@@ -48,7 +48,7 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
         behaves_like_new_command
     {
         it should_not_start_a_new_project =
-            () => current_project.should_not_have_been_asked_to(x => x.start_new_project());
+            () => current_project.was_not_told_to(x => x.start_new_project());
 
         because b = () => sut.cancelled();
     }
trunk/product/MyMoney/Presentation/Model/Menu/File/Commands/OpenCommandSpecs.cs
@@ -13,14 +13,12 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
         context c = () =>
                         {
                             view = the_dependency<ISelectFileToOpenDialog>();
-                            //command = the_dependency<ILoadPresentationModulesCommand>();
                             project = the_dependency<IProject>();
                             save_changes_command = the_dependency<ISaveChangesCommand>();
                         };
 
         protected static IProject project;
         protected static ISelectFileToOpenDialog view;
-        //protected static ILoadPresentationModulesCommand command;
         protected static ISaveChangesCommand save_changes_command;
     }
 
@@ -36,9 +34,8 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
     public class when_attempting_to_open_an_existing_project_after_saving_the_previous_project :
         behaves_like_command_to_open_a_project
     {
-        it should_open_the_project_at_the_file_path_specified = () => project.was_told_to(x => x.open_project_from(file_path));
-
-        //it will_re_load_the_application_shell = () => command.was_told_to(x => x.run());
+        it should_open_the_project_at_the_file_path_specified =
+            () => project.was_told_to(x => x.open_project_from(file_path));
 
         context c = () =>
                         {
@@ -54,9 +51,8 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
     public class when_opening_a_project_after_declining_to_save_the_previous_project :
         behaves_like_command_to_open_a_project
     {
-        it should_open_the_project_at_the_file_path_specified = () => project.was_told_to(x => x.open_project_from(file_path));
-
-        //it will_re_load_the_application_shell = () => command.was_told_to(x => x.run());
+        it should_open_the_project_at_the_file_path_specified =
+            () => project.was_told_to(x => x.open_project_from(file_path));
 
         context c = () =>
                         {
@@ -74,9 +70,7 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
             behaves_like_command_to_open_a_project
     {
         it should_not_open_the_project_at_the_file_path_specified =
-            () => project.should_not_have_been_asked_to(x => x.open_project_from(file_path));
-
-        //it will_not_re_load_the_application_shell = () => command.should_not_have_been_asked_to(x => x.run());
+            () => project.was_not_told_to(x => x.open_project_from(file_path));
 
         context c = () =>
                         {
trunk/product/MyMoney/Presentation/Model/Projects/CurrentProject.cs
@@ -1,4 +1,3 @@
-using Castle.Core;
 using MoMoney.DataAccess.db40;
 using MoMoney.Infrastructure.eventing;
 using MoMoney.Infrastructure.transactions;
@@ -7,7 +6,7 @@ using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Model.Projects
 {
-    public interface IProject // : IEventSubscriber<unsaved_changes_event>
+    public interface IProject
     {
         string name();
         void start_new_project();
@@ -19,7 +18,6 @@ namespace MoMoney.Presentation.Model.Projects
         bool has_unsaved_changes();
     }
 
-    [Singleton]
     public class CurrentProject : IProject
     {
         readonly IEventAggregator broker;
trunk/product/MyMoney/Presentation/Presenters/Shell/NotificationIconPresenter.cs
@@ -1,4 +1,3 @@
-using Castle.Core;
 using MoMoney.Infrastructure.eventing;
 using MoMoney.Presentation.Core;
 using MoMoney.Presentation.Model.messages;
@@ -13,7 +12,6 @@ namespace MoMoney.Presentation.Presenters.Shell
     {
     }
 
-    [Singleton]
     public class NotificationIconPresenter : INotificationIconPresenter
     {
         readonly INotificationIconView view;
trunk/product/MyMoney/Presentation/Presenters/Shell/TaskTrayPresenter.cs
@@ -1,4 +1,3 @@
-using Castle.Core;
 using MoMoney.Infrastructure.eventing;
 using MoMoney.Presentation.Core;
 using MoMoney.Presentation.Model.messages;
@@ -12,7 +11,6 @@ namespace MoMoney.Presentation.Presenters.Shell
     {
     }
 
-    [Singleton]
     public class TaskTrayPresenter : ITaskTrayPresenter
     {
         readonly ITaskTrayMessageView view;
trunk/product/MyMoney/Presentation/Presenters/Shell/TitleBarPresenter.cs
@@ -1,4 +1,3 @@
-using Castle.Core;
 using MoMoney.Infrastructure.eventing;
 using MoMoney.Presentation.Core;
 using MoMoney.Presentation.Model.messages;
@@ -14,7 +13,6 @@ namespace MoMoney.Presentation.Presenters.Shell
     {
     }
 
-    [Singleton]
     public class TitleBarPresenter : ITitleBarPresenter
     {
         readonly ITitleBar view;
@@ -30,10 +28,10 @@ namespace MoMoney.Presentation.Presenters.Shell
 
         public void run()
         {
+            view.display(project.name());
             broker.subscribe_to<unsaved_changes_event>(this);
             broker.subscribe_to<saved_changes_event>(this);
             broker.subscribe_to<new_project_opened>(this);
-            view.display(project.name());
         }
 
         public void notify(unsaved_changes_event dto)
trunk/product/MyMoney/Presentation/Presenters/Startup/SplashScreenPresenter.cs
@@ -15,7 +15,7 @@ namespace MoMoney.Presentation.Presenters.Startup
         readonly ISplashScreenView view;
         ISplashScreenState current_state;
 
-        public SplashScreenPresenter():this(new IntervalTimer(new TimerFactory()), new SplashScreenView())
+        public SplashScreenPresenter() : this(new IntervalTimer(new TimerFactory()), new SplashScreenView())
         {
         }
 
trunk/product/MyMoney/Presentation/Views/billing/view_all_bills.cs → trunk/product/MyMoney/Presentation/Views/billing/ViewAllBills.cs
@@ -5,9 +5,9 @@ using MoMoney.Presentation.Views.core;
 
 namespace MoMoney.Presentation.Views.billing
 {
-    public partial class view_all_bills : ApplicationDockedWindow, IViewAllBills
+    public partial class ViewAllBills : ApplicationDockedWindow, IViewAllBills
     {
-        public view_all_bills()
+        public ViewAllBills()
         {
             InitializeComponent();
             titled("View Bills");
trunk/product/MyMoney/Presentation/Views/billing/view_all_bills.Designer.cs → trunk/product/MyMoney/Presentation/Views/billing/ViewAllBills.Designer.cs
@@ -1,6 +1,6 @@
 namespace MoMoney.Presentation.Views.billing
 {
-    partial class view_all_bills
+    partial class ViewAllBills
     {
         /// <summary>
         /// Required designer variable.
@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(view_all_bills));
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ViewAllBills));
             this.kryptonGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonGroup();
             this.ux_bills = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
             this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
trunk/product/MyMoney/Presentation/Views/billing/view_all_bills.resx → trunk/product/MyMoney/Presentation/Views/billing/ViewAllBills.resx
File renamed without changes
trunk/product/MyMoney/Presentation/Views/Shell/ApplicationShell.cs
@@ -2,14 +2,12 @@
 using System.Collections.Generic;
 using System.ComponentModel.Composition;
 using System.Windows.Forms;
-using Castle.Core;
 using MoMoney.Presentation.Views.core;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views.Shell
 {
     [Export(typeof (IShell))]
-    [Singleton]
     public partial class ApplicationShell : ApplicationWindow, IShell
     {
         readonly IDictionary<string, Control> regions;
trunk/product/MyMoney/Presentation/Views/Shell/NotificationIconView.cs
@@ -1,5 +1,4 @@
 using System.Windows.Forms;
-using Castle.Core;
 using MoMoney.Presentation.Model.Menu;
 using MoMoney.Presentation.Model.Menu.File;
 using MoMoney.Presentation.Model.Menu.Help;
@@ -10,14 +9,12 @@ using MenuItem=System.Windows.Forms.MenuItem;
 
 namespace MoMoney.Presentation.Views.Shell
 {
-    [Singleton]
     public class NotificationIconView : INotificationIconView
     {
         NotifyIcon ux_notification_icon;
         readonly IFileMenu file_menu;
         readonly IWindowMenu window_menu;
         readonly IHelpMenu help_menu;
-        //bool hooked_up;
 
         public NotificationIconView(IFileMenu file_menu, IWindowMenu window_menu, IHelpMenu help_menu)
         {
@@ -29,10 +26,6 @@ namespace MoMoney.Presentation.Views.Shell
 
         public void display(ApplicationIcon icon_to_display, string text_to_display)
         {
-            //if (hooked_up)
-            //{
-            //    return;
-            //}
             ux_notification_icon =
                 new NotifyIcon
                     {
@@ -51,7 +44,6 @@ namespace MoMoney.Presentation.Views.Shell
                                                   }
                                           }
                     };
-            //hooked_up = true;
         }
 
         public void opened_new_project()
@@ -67,7 +59,7 @@ namespace MoMoney.Presentation.Views.Shell
         MenuItem map_from(ISubMenu item)
         {
             var menu_item = new MenuItem(item.name);
-            item.all_menu_items().each(x => menu_item.MenuItems.Add(x.build_menu_item()) );
+            item.all_menu_items().each(x => menu_item.MenuItems.Add(x.build_menu_item()));
             return menu_item;
         }
 
trunk/product/MyMoney/Presentation/Views/Shell/TaskTrayMessage.cs
@@ -1,4 +1,3 @@
-using System;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Presentation.Views.Shell
@@ -8,7 +7,7 @@ namespace MoMoney.Presentation.Views.Shell
         void display(string message, params object[] arguments);
     }
 
-    public class TaskTrayMessage : ITaskTrayMessageView, IDisposable
+    public class TaskTrayMessage : ITaskTrayMessageView
     {
         readonly INotificationIconView view;
 
@@ -21,9 +20,5 @@ namespace MoMoney.Presentation.Views.Shell
         {
             view.show_popup_message(message.formatted_using(arguments));
         }
-
-        public void Dispose()
-        {
-        }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Tasks/infrastructure/FileSystemTasks.cs
@@ -1,35 +0,0 @@
-using System;
-using Castle.Core;
-using MoMoney.Infrastructure.interceptors;
-using MoMoney.Presentation.Model.file_system;
-
-namespace MoMoney.Tasks.infrastructure
-{
-    public interface IFileSystemTasks
-    {
-        IFolder the_currently_selected_folder();
-        void select(IFolder new_folder);
-    }
-
-    [Interceptor(typeof (IUnitOfWorkInterceptor))]
-    [Singleton]
-    public class FileSystemTasks : IFileSystemTasks
-    {
-        private IFolder current_folder;
-
-        public FileSystemTasks()
-        {
-            current_folder = new folder(Environment.GetFolderPath(Environment.SpecialFolder.MyComputer));
-        }
-
-        public IFolder the_currently_selected_folder()
-        {
-            return current_folder;
-        }
-
-        public void select(IFolder new_folder)
-        {
-            current_folder = new_folder;
-        }
-    }
-}
\ No newline at end of file
trunk/product/MyMoney/Testing/spechelpers/core/mocking_extensions.cs
@@ -14,7 +14,7 @@ namespace MoMoney.Testing.spechelpers.core
             return new method_call_occurance<T>(mocked_item, actionToPerform);
         }
 
-        public static void should_not_have_been_asked_to<T>(this T mocked_item, Action<T> action_to_perform)
+        public static void was_not_told_to<T>(this T mocked_item, Action<T> action_to_perform)
         {
             mocked_item.AssertWasNotCalled(action_to_perform);
         }
trunk/product/MyMoney/Utility/Core/IState.cs
@@ -0,0 +1,6 @@
+namespace MoMoney.Utility.Core
+{
+    public interface IState
+    {
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Utility/Core/IStateContext.cs
@@ -0,0 +1,7 @@
+namespace MoMoney.Utility.Core
+{
+    public interface IStateContext<T> where T : IState
+    {
+        void change_state_to(T NEW_STATE);
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/MyMoney.csproj
@@ -160,8 +160,10 @@
     </Reference>
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="boot\container\registration\wire_up_the_infrastructure_in_to_the.cs" />
     <Compile Include="boot\container\tear_down_the_container.cs" />
     <Compile Include="boot\container\registration\wire_up_the_data_access_components_into_the.cs" />
+    <Compile Include="boot\container\registration\wire_up_the_presentation_modules.cs" />
     <Compile Include="DataAccess\db40\ConnectionFactory.cs" />
     <Compile Include="DataAccess\db40\EmptySession.cs" />
     <Compile Include="DataAccess\db40\ObjectDatabaseGateway.cs" />
@@ -223,6 +225,7 @@
     <Compile Include="Infrastructure\Container\Windsor\WindsorContainerFactory.cs" />
     <Compile Include="Infrastructure\debugging\Launch.cs" />
     <Compile Include="Infrastructure\eventing\EventAggregator.cs" />
+    <Compile Include="Infrastructure\eventing\EventAggregatorSpecs.cs" />
     <Compile Include="Infrastructure\eventing\IEvent.cs" />
     <Compile Include="Infrastructure\eventing\IEventSubscriber.cs" />
     <Compile Include="Infrastructure\Extensions\threading_extensions.cs" />
@@ -437,11 +440,11 @@
     <Compile Include="Presentation\Views\helpers\EventTriggerExtensions.cs" />
     <Compile Include="Presentation\Views\IAddCompanyView.cs" />
     <Compile Include="Presentation\Views\billing\IViewAllBills.cs" />
-    <Compile Include="Presentation\Views\billing\view_all_bills.cs">
+    <Compile Include="Presentation\Views\billing\ViewAllBills.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="Presentation\Views\billing\view_all_bills.Designer.cs">
-      <DependentUpon>view_all_bills.cs</DependentUpon>
+    <Compile Include="Presentation\Views\billing\ViewAllBills.Designer.cs">
+      <DependentUpon>ViewAllBills.cs</DependentUpon>
     </Compile>
     <Compile Include="Presentation\Views\core\IDockedContentView.cs" />
     <Compile Include="Presentation\Views\core\IView.cs" />
@@ -530,7 +533,6 @@
     <Compile Include="Presentation\Views\updates\ICheckForUpdatesView.cs" />
     <Compile Include="Tasks\application\BillingTasks.cs" />
     <Compile Include="Tasks\application\CustomerTasks.cs" />
-    <Compile Include="Tasks\infrastructure\FileSystemTasks.cs" />
     <Compile Include="Tasks\application\IncomeTasks.cs" />
     <Compile Include="Tasks\infrastructure\LogFileTasks.cs" />
     <Compile Include="Tasks\infrastructure\UpdateTasks.cs" />
@@ -558,6 +560,8 @@
     <Compile Include="Utility\Core\IDisposableCommand.cs" />
     <Compile Include="Utility\Core\IFactory.cs" />
     <Compile Include="Utility\Core\IParameterizedCommand.cs" />
+    <Compile Include="Utility\Core\IState.cs" />
+    <Compile Include="Utility\Core\IStateContext.cs" />
     <Compile Include="Utility\Core\IValueReturningVisitor.cs" />
     <Compile Include="Utility\Core\IVisitable.cs" />
     <Compile Include="Utility\Core\IVisitor.cs" />
@@ -675,8 +679,8 @@
       <DependentUpon>add_bill_payment.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
-    <EmbeddedResource Include="Presentation\Views\billing\view_all_bills.resx">
-      <DependentUpon>view_all_bills.cs</DependentUpon>
+    <EmbeddedResource Include="Presentation\Views\billing\ViewAllBills.resx">
+      <DependentUpon>ViewAllBills.cs</DependentUpon>
       <SubType>Designer</SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="Presentation\Views\core\ApplicationWindow.resx">