Commit bbe4016

mokhan <mokhan@ce5e1baf-6525-42e4-a1b2-857ea38da20a>
2009-04-10 20:19:42
git-svn-id: https://svn.xp-dev.com/svn/mokhan-mo.money@147 ce5e1baf-6525-42e4-a1b2-857ea38da20a
1 parent 8cb7d35
trunk/product/MyMoney/boot/container/registration/wire_up_the_services_in_to_the.cs
@@ -1,5 +1,6 @@
 using System;
 using MoMoney.DataAccess.core;
+using MoMoney.Domain.accounting.billing;
 using MoMoney.Domain.repositories;
 using MoMoney.Infrastructure.Container;
 using MoMoney.Infrastructure.interceptors;
@@ -21,43 +22,43 @@ namespace MoMoney.boot.container.registration
 
         public void run()
         {
-            registry.proxy(new ServiceLayerConfiguration<IBillingTasks>(
-                               x =>
-                                   {
-                                       //x.register_new_company(null);
-                                       x.save_a_new_bill_using(null);
-                                   }
-                               ),
-                           () =>
-                           new BillingTasks(Lazy.load<IBillRepository>(), Lazy.load<ICompanyRepository>(),
-                                            Lazy.load<ICustomerTasks>()));
-
-            registry.proxy(
-                new ServiceLayerConfiguration<ICustomerTasks>(x => x.get_the_current_customer()),
+            registry.proxy<IBillingTasks, ServiceLayerConfiguration<IBillingTasks>>(
+                () => new BillingTasks(Lazy.load<IBillRepository>(),
+                                       Lazy.load<ICompanyRepository>(),
+                                       Lazy.load<ICustomerTasks>()));
+
+            registry.proxy<ICustomerTasks, ServiceLayerConfiguration<ICustomerTasks>>(
                 () => new CustomerTasks(Lazy.load<IDatabaseGateway>()));
 
-            registry.proxy(
-                new ServiceLayerConfiguration<IIncomeTasks>(x => x.add_new(null)),
+            registry.proxy<IIncomeTasks, ServiceLayerConfiguration<IIncomeTasks>>(
                 () => new IncomeTasks(Lazy.load<ICustomerTasks>(),
                                       Lazy.load<ICompanyRepository>(),
                                       Lazy.load<IIncomeRepository>()));
+
+
+            wire_up_queries();
+            wire_up_the_commands();
+
         }
-    }
 
-    internal class ServiceLayerConfiguration<T> : IConfiguration<IProxyBuilder<T>>
-    {
-        readonly Action<T> configure_it;
+        void wire_up_queries()
+        {
+            registry.proxy<IGetAllCompanysQuery, ServiceLayerConfiguration<IGetAllCompanysQuery>>(
+                () => new GetAllCompanysQuery(Lazy.load<ICompanyRepository>()));
+        }
 
-        public ServiceLayerConfiguration(Action<T> configure_it)
+        void wire_up_the_commands()
         {
-            this.configure_it = configure_it;
+            registry.proxy<IRegisterNewCompanyCommand, ServiceLayerConfiguration<IRegisterNewCompanyCommand>>(
+                () => new RegisterNewCompanyCommand(Lazy.load<ICompanyFactory>()));
         }
+    }
 
+    internal class ServiceLayerConfiguration<T> : IConfiguration<IProxyBuilder<T>>
+    {
         public void configure(IProxyBuilder<T> item)
         {
-            var selector = item.add_interceptor(Lazy.load<IUnitOfWorkInterceptor>());
-            selector.intercept_all();
-            //configure_it(selector.intercept_on);
+            item.add_interceptor(Lazy.load<IUnitOfWorkInterceptor>()).intercept_all();
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/boot/global_error_handling.cs
@@ -13,9 +13,6 @@ namespace MoMoney.boot
     {
         public void run()
         {
-            //Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
-            //Application.EnableVisualStyles();
-            //Application.SetCompatibleTextRenderingDefault(false);
             Application.ThreadException += (sender, e) => handle(e.Exception);
             AppDomain.CurrentDomain.UnhandledException += (o, e) => handle(e.ExceptionObject.downcast_to<Exception>());
         }
trunk/product/MyMoney/boot/start_the_application.cs
@@ -1,6 +1,3 @@
-using System;
-using System.ComponentModel;
-using System.ComponentModel.Design;
 using MoMoney.Infrastructure.interceptors;
 using MoMoney.Infrastructure.Threading;
 using MoMoney.Modules.Core;
@@ -30,23 +27,4 @@ namespace MoMoney.boot
             command.run();
         }
     }
-
-    public class ApplicationContainer : Container
-    {
-        readonly IServiceContainer container;
-
-        public ApplicationContainer() : this(new ServiceContainer())
-        {
-        }
-
-        public ApplicationContainer(IServiceContainer container)
-        {
-            this.container = container;
-        }
-
-        protected override object GetService(Type service)
-        {
-            return container.GetService(service) ?? base.GetService(service);
-        }
-    }
 }
\ No newline at end of file
trunk/product/MyMoney/boot/WindowsFormsApplication.cs
@@ -1,4 +1,7 @@
 using System;
+using System.ComponentModel;
+using System.ComponentModel.Design;
+using System.Diagnostics;
 using System.Globalization;
 using System.Security.Principal;
 using System.Threading;
@@ -27,6 +30,8 @@ namespace MoMoney.boot
 
         public void run()
         {
+            var stopwatch = new Stopwatch();
+            stopwatch.Start();
             Func<ISplashScreenPresenter> presenter = () => new SplashScreenPresenter();
             presenter = presenter.memorize();
 
@@ -41,10 +46,12 @@ namespace MoMoney.boot
                 .then<start_the_application>()
                 .run();
 
+            stopwatch.Stop();
+            this.log().debug("application startup took: {0}", stopwatch.Elapsed);
             start();
         }
 
-        protected void start()
+        void start()
         {
             try
             {
@@ -57,4 +64,23 @@ namespace MoMoney.boot
             }
         }
     }
+
+    public class ApplicationContainer : Container
+    {
+        readonly IServiceContainer container;
+
+        public ApplicationContainer() : this(new ServiceContainer())
+        {
+        }
+
+        public ApplicationContainer(IServiceContainer container)
+        {
+            this.container = container;
+        }
+
+        protected override object GetService(Type service)
+        {
+            return container.GetService(service) ?? base.GetService(service);
+        }
+    }
 }
\ No newline at end of file
trunk/product/MyMoney/DataAccess/db40/spiking/db40_spike_specs.cs
@@ -18,7 +18,9 @@ namespace MoMoney.DataAccess.db40.spiking
                         {
                             original = new TestObject(88, "mo");
                             the_database_file = Path.GetTempFileName();
-                            database = Db4oFactory.OpenFile(the_database_file);
+                            var configuration = Db4oFactory.NewConfiguration();
+                            configuration.LockDatabaseFile(false);
+                            database = Db4oFactory.OpenFile(configuration, the_database_file);
                         };
 
         because b = () =>
trunk/product/MyMoney/Infrastructure/eventing/EventAggregator.cs
@@ -2,7 +2,6 @@ using System;
 using System.Collections.Generic;
 using System.Linq.Expressions;
 using System.Threading;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Infrastructure.eventing
@@ -46,7 +45,6 @@ namespace MoMoney.Infrastructure.eventing
 
         public void publish<T>(Expression<Action<T>> call) where T : class
         {
-            this.log().debug("publishing: {0}", call);
             process(() => subscribers.each(x => x.call_on(call.Compile())));
         }
 
trunk/product/MyMoney/Infrastructure/Threading/ThreadSafeInterceptor.cs
@@ -1,5 +1,4 @@
 using Castle.Core.Interceptor;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Infrastructure.interceptors;
 using MoMoney.Utility.Core;
 
@@ -24,7 +23,6 @@ namespace MoMoney.Infrastructure.Threading
 
         public void Intercept(IInvocation invocation)
         {
-            this.log().debug("running synchronized command: {0}", invocation.Method);
             factory.create().run(new ActionCommand(invocation.Proceed));
         }
     }
trunk/product/MyMoney/Infrastructure/transactions2/ChangeTracker.cs
@@ -1,6 +1,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using MoMoney.Domain.Core;
+using MoMoney.Infrastructure.Extensions;
 using MoMoney.Utility.Extensions;
 
 namespace MoMoney.Infrastructure.transactions2
@@ -32,6 +33,7 @@ namespace MoMoney.Infrastructure.transactions2
 
         public void commit_to(IDatabase database)
         {
+            items.each(x => this.log().debug("committing: {0}", x.current));
             items.each(x => commit(x, database));
             to_be_deleted.each(x => database.apply(registry.prepare_command_for(x)));
         }
trunk/product/MyMoney/Infrastructure/transactions2/ConfigureDatabaseStep.cs
@@ -12,9 +12,9 @@ namespace MoMoney.Infrastructure.transactions2
         public void configure(IConfiguration item)
         {
             item.LockDatabaseFile(false);
-            item.UpdateDepth(10);
-            item.WeakReferences(true);
-            item.AutomaticShutDown(true);
+            //item.UpdateDepth(10);
+            //item.WeakReferences(true);
+            //item.AutomaticShutDown(true);
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/ConnectionFactory.cs
@@ -8,7 +8,7 @@ namespace MoMoney.Infrastructure.transactions2
 {
     public interface IConnectionFactory
     {
-        IObjectContainer open_connection_to(IFile the_path_to_the_database_file);
+        IDatabaseConnection open_connection_to(IFile the_path_to_the_database_file);
     }
 
     public class ConnectionFactory : IConnectionFactory
@@ -20,23 +20,23 @@ namespace MoMoney.Infrastructure.transactions2
             this.setup = setup;
         }
 
-        public IObjectContainer open_connection_to(IFile the_path_to_the_database_file)
+        public IDatabaseConnection open_connection_to(IFile the_path_to_the_database_file)
         {
-            this.log().debug("opening connection to: {0}", the_path_to_the_database_file);
             var configuration = Db4oFactory.NewConfiguration();
             setup.configure(configuration);
-
-            return get_container(the_path_to_the_database_file, configuration);
+            return new DatabaseConnection(get_container(the_path_to_the_database_file, configuration));
         }
 
         IObjectContainer get_container(IFile the_path_to_the_database_file, IConfiguration configuration)
         {
             var container = Db4oFactory.OpenFile(configuration, the_path_to_the_database_file.path);
             var registry = EventRegistryFactory.ForObjectContainer(container);
-
-            registry.ClassRegistered += (sender, args) => this.log().debug("class registered: {0}", args);
-            registry.Instantiated += (sender, args) => this.log().debug("class instantiated: {0}", args.Object);
-
+            registry.ClassRegistered +=
+                (sender, args) => this.log().debug("class registered: {0}", args.ClassMetadata());
+            registry.Instantiated += (sender, args) => this.log().debug("class instantiated: {0}", args.Object.GetType().Name);
+            registry.Committed +=
+                (sender, args) =>
+                this.log().debug("added: {0}, updated: {1}, deleted: {2}", args.Added, args.Updated, args.Deleted);
             return container;
         }
     }
trunk/product/MyMoney/Infrastructure/transactions2/Database.cs
@@ -19,7 +19,7 @@ namespace MoMoney.Infrastructure.transactions2
         {
             using (var connection = factory.open_connection_to(configuration.path_to_database()))
             {
-                return connection.Query<T>().ToList();
+                return connection.query<T>().ToList();
             }
         }
 
@@ -28,7 +28,7 @@ namespace MoMoney.Infrastructure.transactions2
             using (var connection = factory.open_connection_to(configuration.path_to_database()))
             {
                 statement.prepare(connection);
-                connection.Commit();
+                connection.commit();
             }
         }
     }
trunk/product/MyMoney/Infrastructure/transactions2/DatabaseConfiguration.cs
@@ -1,4 +1,3 @@
-using System;
 using System.IO;
 using MoMoney.Infrastructure.eventing;
 using MoMoney.Presentation.Model.messages;
@@ -15,7 +14,6 @@ namespace MoMoney.Infrastructure.transactions2
     public class DatabaseConfiguration : IDatabaseConfiguration, IEventSubscriber<NewProjectOpened>
     {
         IFile path;
-        readonly object mutex = new object();
 
         public DatabaseConfiguration()
         {
@@ -24,7 +22,7 @@ namespace MoMoney.Infrastructure.transactions2
 
         public IFile path_to_database()
         {
-            lock (mutex) return path;
+            return path;
         }
 
         public void change_path_to(IFile file)
@@ -35,12 +33,7 @@ namespace MoMoney.Infrastructure.transactions2
 
         public void notify(NewProjectOpened message)
         {
-            within_lock(() => path = new ApplicationFile(Path.GetTempFileName()));
-        }
-
-        void within_lock(Action action)
-        {
-            lock (mutex) action();
+            path = new ApplicationFile(Path.GetTempFileName());
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/DatabaseConnection.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using Db4objects.Db4o;
+
+namespace MoMoney.Infrastructure.transactions2
+{
+    public interface IDatabaseConnection : IDisposable
+    {
+        IEnumerable<T> query<T>();
+        IEnumerable<T> query<T>(Predicate<T> predicate);
+        void delete<T>(T entity);
+        void commit();
+        void store<T>(T entity);
+    }
+
+    public class DatabaseConnection : IDatabaseConnection
+    {
+        readonly IObjectContainer container;
+
+        public DatabaseConnection(IObjectContainer container)
+        {
+            this.container = container;
+        }
+
+        public void Dispose()
+        {
+            container.Close();
+            container.Dispose();
+        }
+
+        public IEnumerable<T> query<T>()
+        {
+            return container.Query<T>();
+        }
+
+        public IEnumerable<T> query<T>(Predicate<T> predicate)
+        {
+            return container.Query(predicate);
+        }
+
+        public void delete<T>(T entity)
+        {
+            container.Delete(entity);
+        }
+
+        public void commit()
+        {
+            container.Commit();
+        }
+
+        public void store<T>(T entity)
+        {
+            container.Store(entity);
+        }
+    }
+}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/IdentityMapProxy.cs
@@ -1,6 +1,5 @@
 using System.Collections.Generic;
 using MoMoney.Domain.Core;
-using MoMoney.Infrastructure.Extensions;
 
 namespace MoMoney.Infrastructure.transactions2
 {
@@ -23,7 +22,6 @@ namespace MoMoney.Infrastructure.transactions2
         public void add(Key key, Value value)
         {
             change_tracker.register(value);
-            this.log().debug("registered: {0},{1}", key, value);
             real_map.add(key, value);
         }
 
trunk/product/MyMoney/Infrastructure/transactions2/IStatement.cs
@@ -1,9 +1,7 @@
-using Db4objects.Db4o;
-
 namespace MoMoney.Infrastructure.transactions2
 {
     public interface IStatement
     {
-        void prepare(IObjectContainer connection);
+        void prepare(IDatabaseConnection connection);
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/StatementRegistry.cs
@@ -1,6 +1,5 @@
-using Db4objects.Db4o;
 using MoMoney.Domain.Core;
-using MoMoney.Utility.Extensions;
+using MoMoney.Infrastructure.Extensions;
 
 namespace MoMoney.Infrastructure.transactions2
 {
@@ -26,11 +25,10 @@ namespace MoMoney.Infrastructure.transactions2
             this.entity = entity;
         }
 
-        public void prepare(IObjectContainer connection)
+        public void prepare(IDatabaseConnection connection)
         {
-            var query = connection.Query<T>(x => x.id.Equals(entity.id));
-            query.each(x => connection.Delete(x));
-            connection.Store(entity);
+            connection.store(entity);
+            this.log().debug("saving: {0}", entity);
         }
     }
 
@@ -43,9 +41,9 @@ namespace MoMoney.Infrastructure.transactions2
             this.entity = entity;
         }
 
-        public void prepare(IObjectContainer connection)
+        public void prepare(IDatabaseConnection connection)
         {
-            connection.Delete(entity);
+            connection.delete(entity);
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/transactions2/TrackerEntry.cs
@@ -1,5 +1,4 @@
 using System.Reflection;
-using MoMoney.Infrastructure.Extensions;
 
 namespace MoMoney.Infrastructure.transactions2
 {
@@ -30,16 +29,13 @@ namespace MoMoney.Infrastructure.transactions2
                 var current_value = field.GetValue(current);
                 if (original_value == null && current_value != null)
                 {
-                    this.log().debug("has changes: {0}", original);
                     return true;
                 }
                 if (original_value != null && !original_value.Equals(current_value))
                 {
-                    this.log().debug("has changes: {0}", original);
                     return true;
                 }
             }
-            this.log().debug("does not have changes: {0}", original);
             return false;
         }
     }
trunk/product/MyMoney/Presentation/Model/Projects/file.cs
@@ -1,4 +1,5 @@
 using System.IO;
+using MoMoney.Infrastructure.Extensions;
 
 namespace MoMoney.Presentation.Model.Projects
 {
@@ -25,6 +26,7 @@ namespace MoMoney.Presentation.Model.Projects
 
         public void copy_to(string other_path)
         {
+            this.log().debug("copying {0} to {1}", path, other_path);
             File.Copy(path, other_path, true);
         }
 
trunk/product/MyMoney/Presentation/Presenters/Shell/LogFilePresenter.cs
@@ -22,7 +22,9 @@ namespace MoMoney.Presentation.Presenters.Shell
 
         public void run()
         {
-            view.display(tasks.get_the_path_to_the_log_file(), tasks.get_the_contents_of_the_log_file());
+            view.display(tasks.get_the_path_to_the_log_file());
+            view.run(tasks.get_the_contents_of_the_log_file());
+            //tasks.notify(view);
         }
 
         IDockedContentView IContentPresenter.View
trunk/product/MyMoney/Presentation/Presenters/Shell/LogFileViewPresenterSpecs.cs
@@ -20,7 +20,7 @@ namespace MoMoney.Presentation.Presenters.Shell
 
     public class when_displaying_the_log_file : behaves_like_log_file_presenter
     {
-        it should_display_the_contents_of_the_log_file = () => view.was_told_to(x => x.display(log_file_path, log_file_contents));
+        it should_display_the_contents_of_the_log_file = () => view.was_told_to(x => x.display(log_file_path));
 
         context c = () =>
                         {
trunk/product/MyMoney/Presentation/Presenters/AddCompanyPresenter.cs
@@ -32,22 +32,17 @@ namespace MoMoney.Presentation.Presenters
         public void run()
         {
             view.attach_to(this);
-            view.run(tasks.all_companys());
-            //pump.run<IEnumerable<ICompany>, IGetAllCompanysQuery>(view);
+            pump.run<IEnumerable<ICompany>, IGetAllCompanysQuery>(view);
         }
 
         public void submit(RegisterNewCompany dto)
         {
             if (company_has_already_been_registered(dto))
-            {
                 view.notify(create_error_message_from(dto));
-            }
             else
-            {
-                pump.run<IRegisterNewCompanyCommand, RegisterNewCompany>(dto);
-                //pump.run<IEnumerable<ICompany>, IGetAllCompanysQuery>(view);
-                view.run(tasks.all_companys());
-            }
+                pump
+                    .run<IRegisterNewCompanyCommand, RegisterNewCompany>(dto)
+                    .run<IEnumerable<ICompany>, IGetAllCompanysQuery>(view);
         }
 
         bool company_has_already_been_registered(RegisterNewCompany dto)
trunk/product/MyMoney/Presentation/Presenters/AddCompanyPresenterSpecs.cs
@@ -34,15 +34,17 @@ namespace MoMoney.Presentation.Presenters
 
     public class when_registering_a_new_company : behaves_like_the_add_company_presenter
     {
-        context c = () => when_the(tasks).is_asked_for(x => x.all_companys()).it_will_return_nothing();
-
-        because b = () =>
+        context c = () =>
                         {
                             dto = new RegisterNewCompany {company_name = "Microsoft"};
-                            sut.submit(dto);
+                            when_the(tasks).is_asked_for(x => x.all_companys()).it_will_return_nothing();
+                            when_the(pump)
+                                .is_told_to(x => x.run<IRegisterNewCompanyCommand, RegisterNewCompany>(dto))
+                                .it_will_return(pump);
                         };
 
-        //it should_add_the_new_company = () => tasks.was_told_to(x => x.register_new_company(dto));
+        because b = () => { sut.submit(dto); };
+
         it should_add_the_new_company =
             () => pump.was_told_to(x => x.run<IRegisterNewCompanyCommand, RegisterNewCompany>(dto));
 
trunk/product/MyMoney/Presentation/Views/core/ApplicationWindow.cs
@@ -1,6 +1,5 @@
 using System;
 using System.Windows.Forms;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Presentation.Resources;
 
 namespace MoMoney.Presentation.Views.core
@@ -19,12 +18,14 @@ namespace MoMoney.Presentation.Views.core
         {
             InitializeComponent();
             Icon = ApplicationIcons.Application;
-            this.log().debug("created {0}", GetType());
+            //this.log().debug("created {0}", GetType());
         }
 
         public IApplicationWindow create_tool_tip_for(string title, string caption, Control control)
         {
-            new ToolTip {IsBalloon = true, ToolTipTitle = title}.SetToolTip(control, caption);
+            var tip = new ToolTip {IsBalloon = true, ToolTipTitle = title};
+            tip.SetToolTip(control, caption);
+            control.Controls.Add(adapt(tip));
             return this;
         }
 
@@ -53,7 +54,28 @@ namespace MoMoney.Presentation.Views.core
         {
             //if (InvokeRequired) BeginInvoke(action);
             //else action();
-             action();
+            action();
+        }
+
+        Control adapt(ToolTip item)
+        {
+            return new ControlAdapter(item);
+        }
+
+        internal class ControlAdapter : Control
+        {
+            readonly IDisposable item;
+
+            public ControlAdapter(IDisposable item)
+            {
+                this.item = item;
+            }
+
+            protected override void Dispose(bool disposing)
+            {
+                if (disposing) item.Dispose();
+                base.Dispose(disposing);
+            }
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/Shell/ILogFileView.cs
@@ -1,9 +1,10 @@
 using MoMoney.Presentation.Views.core;
+using MoMoney.Utility.Core;
 
 namespace MoMoney.Presentation.Views.Shell
 {
-    public interface ILogFileView : IDockedContentView
+    public interface ILogFileView : IDockedContentView, ICallback<string>
     {
-        void display(string file_path, string file_contents);
+        void display(string file_path);
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/Shell/LogFileView.cs
@@ -9,9 +9,13 @@ namespace MoMoney.Presentation.Views.Shell
             InitializeComponent();
         }
 
-        public void display(string file_path, string file_contents)
+        public void display(string file_path)
         {
             titled("Log File - {0}", file_path);
+        }
+
+        public void run(string file_contents)
+        {
             ux_log_file.Text = file_contents;
         }
     }
trunk/product/MyMoney/Presentation/Views/AddCompanyView.cs
@@ -3,7 +3,6 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using MoMoney.Domain.accounting.billing;
-using MoMoney.Infrastructure.Extensions;
 using MoMoney.Presentation.Databindings;
 using MoMoney.Presentation.Model.interaction;
 using MoMoney.Presentation.Presenters;
@@ -25,7 +24,6 @@ namespace MoMoney.Presentation.Views
             dto = new RegisterNewCompany();
 
             initialize1();
-            initialize2();
         }
 
         void initialize1()
@@ -36,22 +34,6 @@ namespace MoMoney.Presentation.Views
             listView1.Columns.Add("Name");
         }
 
-        void initialize2()
-        {
-            listView2.View = View.Details;
-            listView2.Columns.Add("Name");
-            ux_company_search_textbox.TextChanged += (sender, args) =>
-                                                         {
-                                                             var foundItem =
-                                                                 listView2.FindItemWithText(
-                                                                     ux_company_search_textbox.Text, false, 0, true);
-                                                             if (foundItem != null)
-                                                             {
-                                                                 listView2.TopItem = foundItem;
-                                                             }
-                                                         };
-        }
-
         public void attach_to(IAddCompanyPresenter presenter)
         {
             ux_company_name.bind_to(dto, x => x.company_name);
@@ -64,12 +46,7 @@ namespace MoMoney.Presentation.Views
             ux_companys_listing.DataSource = companies.databind();
 
             listView1.Items.Clear();
-            listView1.Items.AddRange(companies.Select(x => new ListViewItem(x.name, 2)).ToArray());
-
-            listView2.Items.Clear();
-            listView2.Items.AddRange(companies.Select(x => new ListViewItem(x.name)).ToArray());
-
-            objectListView1.SetObjects(companies.ToList());
+            listView1.Items.AddRange(companies.Select(x => new ListViewItem(x.name, 3)).ToArray());
         }
 
         public void notify(params notification_message[] messages)
trunk/product/MyMoney/Presentation/Views/AddCompanyView.Designer.cs
@@ -31,6 +31,7 @@ namespace MoMoney.Presentation.Views
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AddCompanyView));
             this.kryptonHeaderGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonHeaderGroup();
             this.kryptonSplitContainer1 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
+            this.listView1 = new System.Windows.Forms.ListView();
             this.ux_submit_button = new ComponentFactory.Krypton.Toolkit.KryptonButton();
             this.kryptonLabel1 = new ComponentFactory.Krypton.Toolkit.KryptonLabel();
             this.ux_company_name = new ComponentFactory.Krypton.Toolkit.KryptonTextBox();
@@ -38,10 +39,8 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer2 = new ComponentFactory.Krypton.Toolkit.KryptonSplitContainer();
             this.kryptonHeader1 = new ComponentFactory.Krypton.Toolkit.KryptonHeader();
             this.ux_companys_listing = new ComponentFactory.Krypton.Toolkit.KryptonDataGridView();
-            this.listView1 = new System.Windows.Forms.ListView();
-            this.ux_company_search_textbox = new System.Windows.Forms.TextBox();
-            this.listView2 = new System.Windows.Forms.ListView();
-            this.objectListView1 = new BrightIdeasSoftware.ObjectListView();
+            this.kryptonGroup1 = new ComponentFactory.Krypton.Toolkit.KryptonGroup();
+            this.kryptonGroup2 = new ComponentFactory.Krypton.Toolkit.KryptonGroup();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonHeaderGroup1.Panel)).BeginInit();
             this.kryptonHeaderGroup1.Panel.SuspendLayout();
@@ -59,14 +58,21 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer2.Panel2.SuspendLayout();
             this.kryptonSplitContainer2.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.ux_companys_listing)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup1.Panel)).BeginInit();
+            this.kryptonGroup1.Panel.SuspendLayout();
+            this.kryptonGroup1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup2.Panel)).BeginInit();
+            this.kryptonGroup2.Panel.SuspendLayout();
+            this.kryptonGroup2.SuspendLayout();
             this.SuspendLayout();
             // 
             // kryptonHeaderGroup1
             // 
             this.kryptonHeaderGroup1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.kryptonHeaderGroup1.Location = new System.Drawing.Point(0, 0);
-            this.kryptonHeaderGroup1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.kryptonHeaderGroup1.Margin = new System.Windows.Forms.Padding(4);
             this.kryptonHeaderGroup1.Name = "kryptonHeaderGroup1";
             // 
             // kryptonHeaderGroup1.Panel
@@ -87,19 +93,13 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer1.Cursor = System.Windows.Forms.Cursors.Default;
             this.kryptonSplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.kryptonSplitContainer1.Location = new System.Drawing.Point(0, 0);
-            this.kryptonSplitContainer1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.kryptonSplitContainer1.Margin = new System.Windows.Forms.Padding(4);
             this.kryptonSplitContainer1.Name = "kryptonSplitContainer1";
             // 
             // kryptonSplitContainer1.Panel1
             // 
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.objectListView1);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.listView2);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_company_search_textbox);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.listView1);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_submit_button);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.kryptonLabel1);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_company_name);
-            this.kryptonSplitContainer1.Panel1.Controls.Add(this.ux_cancel_button);
+            this.kryptonSplitContainer1.Panel1.Controls.Add(this.kryptonGroup2);
+            this.kryptonSplitContainer1.Panel1.Controls.Add(this.kryptonGroup1);
             // 
             // kryptonSplitContainer1.Panel2
             // 
@@ -109,10 +109,19 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer1.SplitterDistance = 764;
             this.kryptonSplitContainer1.TabIndex = 25;
             // 
+            // listView1
+            // 
+            this.listView1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.listView1.Location = new System.Drawing.Point(0, 0);
+            this.listView1.Name = "listView1";
+            this.listView1.Size = new System.Drawing.Size(734, 334);
+            this.listView1.TabIndex = 21;
+            this.listView1.UseCompatibleStateImageBehavior = false;
+            // 
             // ux_submit_button
             // 
-            this.ux_submit_button.Location = new System.Drawing.Point(147, 78);
-            this.ux_submit_button.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ux_submit_button.Location = new System.Drawing.Point(147, 77);
+            this.ux_submit_button.Margin = new System.Windows.Forms.Padding(4);
             this.ux_submit_button.Name = "ux_submit_button";
             this.ux_submit_button.Size = new System.Drawing.Size(120, 31);
             this.ux_submit_button.TabIndex = 2;
@@ -126,8 +135,8 @@ namespace MoMoney.Presentation.Views
             // 
             // kryptonLabel1
             // 
-            this.kryptonLabel1.Location = new System.Drawing.Point(15, 27);
-            this.kryptonLabel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.kryptonLabel1.Location = new System.Drawing.Point(15, 26);
+            this.kryptonLabel1.Margin = new System.Windows.Forms.Padding(4);
             this.kryptonLabel1.Name = "kryptonLabel1";
             this.kryptonLabel1.Size = new System.Drawing.Size(125, 24);
             this.kryptonLabel1.TabIndex = 20;
@@ -138,8 +147,8 @@ namespace MoMoney.Presentation.Views
             // 
             // ux_company_name
             // 
-            this.ux_company_name.Location = new System.Drawing.Point(147, 27);
-            this.ux_company_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ux_company_name.Location = new System.Drawing.Point(147, 26);
+            this.ux_company_name.Margin = new System.Windows.Forms.Padding(4);
             this.ux_company_name.Name = "ux_company_name";
             this.ux_company_name.Size = new System.Drawing.Size(547, 24);
             this.ux_company_name.TabIndex = 1;
@@ -148,8 +157,8 @@ namespace MoMoney.Presentation.Views
             // 
             this.ux_cancel_button.DialogResult = System.Windows.Forms.DialogResult.Cancel;
             this.ux_cancel_button.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
-            this.ux_cancel_button.Location = new System.Drawing.Point(275, 78);
-            this.ux_cancel_button.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ux_cancel_button.Location = new System.Drawing.Point(275, 77);
+            this.ux_cancel_button.Margin = new System.Windows.Forms.Padding(4);
             this.ux_cancel_button.Name = "ux_cancel_button";
             this.ux_cancel_button.Size = new System.Drawing.Size(76, 31);
             this.ux_cancel_button.TabIndex = 3;
@@ -161,7 +170,7 @@ namespace MoMoney.Presentation.Views
             this.kryptonSplitContainer2.Cursor = System.Windows.Forms.Cursors.Default;
             this.kryptonSplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
             this.kryptonSplitContainer2.Location = new System.Drawing.Point(0, 0);
-            this.kryptonSplitContainer2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.kryptonSplitContainer2.Margin = new System.Windows.Forms.Padding(4);
             this.kryptonSplitContainer2.Name = "kryptonSplitContainer2";
             this.kryptonSplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
             // 
@@ -180,7 +189,7 @@ namespace MoMoney.Presentation.Views
             // kryptonHeader1
             // 
             this.kryptonHeader1.Location = new System.Drawing.Point(4, 4);
-            this.kryptonHeader1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.kryptonHeader1.Margin = new System.Windows.Forms.Padding(4);
             this.kryptonHeader1.Name = "kryptonHeader1";
             this.kryptonHeader1.Size = new System.Drawing.Size(144, 37);
             this.kryptonHeader1.TabIndex = 25;
@@ -196,45 +205,37 @@ namespace MoMoney.Presentation.Views
             this.ux_companys_listing.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.ux_companys_listing.Dock = System.Windows.Forms.DockStyle.Fill;
             this.ux_companys_listing.Location = new System.Drawing.Point(0, 0);
-            this.ux_companys_listing.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ux_companys_listing.Margin = new System.Windows.Forms.Padding(4);
             this.ux_companys_listing.Name = "ux_companys_listing";
             this.ux_companys_listing.ReadOnly = true;
             this.ux_companys_listing.Size = new System.Drawing.Size(266, 762);
             this.ux_companys_listing.StateCommon.BackStyle = ComponentFactory.Krypton.Toolkit.PaletteBackStyle.GridBackgroundList;
             this.ux_companys_listing.TabIndex = 25;
             // 
-            // listView1
+            // kryptonGroup1
             // 
-            this.listView1.Location = new System.Drawing.Point(28, 241);
-            this.listView1.Name = "listView1";
-            this.listView1.Size = new System.Drawing.Size(706, 97);
-            this.listView1.TabIndex = 21;
-            this.listView1.UseCompatibleStateImageBehavior = false;
+            this.kryptonGroup1.Location = new System.Drawing.Point(11, 4);
+            this.kryptonGroup1.Name = "kryptonGroup1";
             // 
-            // ux_company_search_textbox
+            // kryptonGroup1.Panel
             // 
-            this.ux_company_search_textbox.Location = new System.Drawing.Point(518, 389);
-            this.ux_company_search_textbox.Name = "ux_company_search_textbox";
-            this.ux_company_search_textbox.Size = new System.Drawing.Size(216, 22);
-            this.ux_company_search_textbox.TabIndex = 22;
+            this.kryptonGroup1.Panel.Controls.Add(this.kryptonLabel1);
+            this.kryptonGroup1.Panel.Controls.Add(this.ux_cancel_button);
+            this.kryptonGroup1.Panel.Controls.Add(this.ux_company_name);
+            this.kryptonGroup1.Panel.Controls.Add(this.ux_submit_button);
+            this.kryptonGroup1.Size = new System.Drawing.Size(710, 135);
+            this.kryptonGroup1.TabIndex = 23;
             // 
-            // listView2
+            // kryptonGroup2
             // 
-            this.listView2.Location = new System.Drawing.Point(28, 417);
-            this.listView2.Name = "listView2";
-            this.listView2.Size = new System.Drawing.Size(706, 80);
-            this.listView2.TabIndex = 23;
-            this.listView2.UseCompatibleStateImageBehavior = false;
+            this.kryptonGroup2.Location = new System.Drawing.Point(12, 173);
+            this.kryptonGroup2.Name = "kryptonGroup2";
             // 
-            // objectListView1
+            // kryptonGroup2.Panel
             // 
-            this.objectListView1.ItemRenderer = null;
-            this.objectListView1.Location = new System.Drawing.Point(28, 514);
-            this.objectListView1.Name = "objectListView1";
-            this.objectListView1.Size = new System.Drawing.Size(706, 203);
-            this.objectListView1.TabIndex = 24;
-            this.objectListView1.UseCompatibleStateImageBehavior = false;
-            this.objectListView1.View = System.Windows.Forms.View.Details;
+            this.kryptonGroup2.Panel.Controls.Add(this.listView1);
+            this.kryptonGroup2.Size = new System.Drawing.Size(736, 336);
+            this.kryptonGroup2.TabIndex = 24;
             // 
             // AddCompanyView
             // 
@@ -244,7 +245,7 @@ namespace MoMoney.Presentation.Views
             this.CancelButton = this.ux_cancel_button;
             this.ClientSize = new System.Drawing.Size(1037, 876);
             this.Controls.Add(this.kryptonHeaderGroup1);
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "AddCompanyView";
             this.TabText = "AddExpenseView";
             this.Text = "Add A New Bill";
@@ -254,7 +255,6 @@ namespace MoMoney.Presentation.Views
             this.kryptonHeaderGroup1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.kryptonSplitContainer1.Panel1)).EndInit();
             this.kryptonSplitContainer1.Panel1.ResumeLayout(false);
-            this.kryptonSplitContainer1.Panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.kryptonSplitContainer1.Panel2)).EndInit();
             this.kryptonSplitContainer1.Panel2.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.kryptonSplitContainer1)).EndInit();
@@ -267,7 +267,15 @@ namespace MoMoney.Presentation.Views
             ((System.ComponentModel.ISupportInitialize)(this.kryptonSplitContainer2)).EndInit();
             this.kryptonSplitContainer2.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.ux_companys_listing)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.objectListView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup1.Panel)).EndInit();
+            this.kryptonGroup1.Panel.ResumeLayout(false);
+            this.kryptonGroup1.Panel.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup1)).EndInit();
+            this.kryptonGroup1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup2.Panel)).EndInit();
+            this.kryptonGroup2.Panel.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.kryptonGroup2)).EndInit();
+            this.kryptonGroup2.ResumeLayout(false);
             this.ResumeLayout(false);
 
         }
@@ -284,9 +292,8 @@ namespace MoMoney.Presentation.Views
         private ComponentFactory.Krypton.Toolkit.KryptonSplitContainer kryptonSplitContainer2;
         private ComponentFactory.Krypton.Toolkit.KryptonDataGridView ux_companys_listing;
         private System.Windows.Forms.ListView listView1;
-        private System.Windows.Forms.TextBox ux_company_search_textbox;
-        private System.Windows.Forms.ListView listView2;
-        private BrightIdeasSoftware.ObjectListView objectListView1;
+        private ComponentFactory.Krypton.Toolkit.KryptonGroup kryptonGroup1;
+        private ComponentFactory.Krypton.Toolkit.KryptonGroup kryptonGroup2;
 
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/AddCompanyView.resx
@@ -121,7 +121,7 @@
   <data name="kryptonHeader1.Values.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
-        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsPAAALDwGS+QOlAAAC6UlE
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsOAAALDgFAvuFBAAAC6UlE
         QVQ4T43TW0jTYRgGcC+MKEQziLwQPGTqWqY25zw1/6bzsDmdeUxzMy1dmytrrU2nQWrmIZVCo4zAEgm7
         SKSg0iLIs66ssDLdPG2armxFdpgOn6aQJCX63n7v87t4Xj4TkzUmVJK7US5y5hdJ7X+Uynfqz56yFayV
         +ee9ppzAaKc3ND3ekJ0mFlYFxGn2lgUS+6Zrxc4oydmhPc3fTiwuN9yWo7PRHcrOSHBS0rEqkC+2rXpU
@@ -140,7 +140,7 @@
   <data name="kryptonHeaderGroup1.ValuesPrimary.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6
-        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsPAAALDwGS+QOlAAAC6UlE
+        JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsOAAALDgFAvuFBAAAC6UlE
         QVQ4T43TW0jTYRgGcC+MKEQziLwQPGTqWqY25zw1/6bzsDmdeUxzMy1dmytrrU2nQWrmIZVCo4zAEgm7
         SKSg0iLIs66ssDLdPG2armxFdpgOn6aQJCX63n7v87t4Xj4TkzUmVJK7US5y5hdJ7X+Uynfqz56yFayV
         +ee9ppzAaKc3ND3ekJ0mFlYFxGn2lgUS+6Zrxc4oydmhPc3fTiwuN9yWo7PRHcrOSHBS0rEqkC+2rXpU
trunk/product/MyMoney/Tasks/infrastructure/core/CommandPump.cs
@@ -6,11 +6,11 @@ namespace MoMoney.Tasks.infrastructure.core
 {
     public interface ICommandPump
     {
-        void run<Command>() where Command : ICommand;
-        void run<Command>(Command command) where Command : ICommand;
-        void run<Command, T>(T input) where Command : IParameterizedCommand<T>;
-        void run<T>(ICallback<T> item, IQuery<T> query);
-        void run<Output, Query>(ICallback<Output> item) where Query : IQuery<Output>;
+        ICommandPump run<Command>() where Command : ICommand;
+        ICommandPump run<Command>(Command command) where Command : ICommand;
+        ICommandPump run<Command, T>(T input) where Command : IParameterizedCommand<T>;
+        ICommandPump run<T>(ICallback<T> item, IQuery<T> query);
+        ICommandPump run<Output, Query>(ICallback<Output> item) where Query : IQuery<Output>;
     }
 
     public class CommandPump : ICommandPump
@@ -26,29 +26,31 @@ namespace MoMoney.Tasks.infrastructure.core
             this.registry = registry;
         }
 
-        public void run<Command>() where Command : ICommand
+        public ICommandPump run<Command>() where Command : ICommand
         {
-            run(registry.get_a<Command>());
+            return run(registry.get_a<Command>());
         }
 
-        public void run<Command>(Command command) where Command : ICommand
+        public ICommandPump run<Command>(Command command) where Command : ICommand
         {
             processor.add(command);
+            return this;
         }
 
-        public void run<Command, T>(T input) where Command : IParameterizedCommand<T>
+        public ICommandPump run<Command, T>(T input) where Command : IParameterizedCommand<T>
         {
             processor.add(() => registry.get_a<Command>().run(input));
+            return this;
         }
 
-        public void run<T>(ICallback<T> item, IQuery<T> query)
+        public ICommandPump run<T>(ICallback<T> item, IQuery<T> query)
         {
-            run(factory.create_for(item, query));
+            return run(factory.create_for(item, query));
         }
 
-        public void run<Output, Query>(ICallback<Output> item) where Query : IQuery<Output>
+        public ICommandPump run<Output, Query>(ICallback<Output> item) where Query : IQuery<Output>
         {
-            run(item, registry.get_a<Query>());
+            return run(item, registry.get_a<Query>());
         }
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Tasks/infrastructure/LogFileTasks.cs
@@ -7,13 +7,16 @@ namespace MoMoney.Tasks.infrastructure
     {
         string get_the_contents_of_the_log_file();
         string get_the_path_to_the_log_file();
+        //void notify(ICallback<string> view);
     }
 
     public class LogFileTasks : ILogFileTasks
     {
         public string get_the_contents_of_the_log_file()
         {
-            using ( var file_stream = new FileStream(get_the_path_to_the_log_file(), FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+            using (
+                var file_stream = new FileStream(get_the_path_to_the_log_file(), FileMode.Open, FileAccess.Read,
+                                                 FileShare.ReadWrite))
             {
                 using (var reader = new StreamReader(file_stream))
                 {
@@ -26,5 +29,13 @@ namespace MoMoney.Tasks.infrastructure
         {
             return Path.Combine(this.startup_directory(), "logs/log.txt");
         }
+
+        //public void notify(ICallback<string> view)
+        //{
+        //    var watcher = new FileSystemWatcher(Path.Combine(this.startup_directory(), "logs"), "log.txt");
+        //    watcher.Changed += (sender, args) => view.run(get_the_contents_of_the_log_file());
+        //    watcher.EnableRaisingEvents = true;
+        //    watcher.Error += (sender, args) => this.log().error(args.GetException());
+        //}
     }
 }
\ No newline at end of file
trunk/product/MyMoney/Testing/spechelpers/contexts/behaves_like_a_repository.cs
@@ -1,4 +1,3 @@
-using System;
 using developwithpassion.bdd.contexts;
 using MoMoney.DataAccess.core;
 using MoMoney.Infrastructure.Container;
@@ -13,27 +12,16 @@ namespace MoMoney.Testing.spechelpers.contexts
     {
         public override IDatabaseGateway create_sut()
         {
-            Console.Out.WriteLine("create sut");
             return resolve.dependency_for<IDatabaseGateway>();
         }
 
         context c = () =>
                         {
-                            //};
-                            //before_each_observation before =
-                            //    () =>
-                            //        {
                             session = resolve.dependency_for<ISessionFactory>().create();
                             resolve.dependency_for<IContext>().add(resolve.dependency_for<IKey<ISession>>(), session);
-                            Console.Out.WriteLine("before each");
                         };
 
-        after_each_observation after =
-            () =>
-                {
-                    session.Dispose();
-                    Console.Out.WriteLine("after each");
-                };
+        after_each_observation after = () => session.Dispose();
 
         static ISession session;
     }
trunk/product/MyMoney/Utility/Extensions/func_extensions.cs → trunk/product/MyMoney/Utility/Extensions/FuncExtensions.cs
@@ -2,7 +2,7 @@ using System;
 
 namespace MoMoney.Utility.Extensions
 {
-    public static class func_extensions
+    public static class FuncExtensions
     {
         public static Func<T> memorize<T>(this Func<T> item) where T : class
         {
@@ -11,7 +11,7 @@ namespace MoMoney.Utility.Extensions
                        {
                            if (null == the_implementation)
                            {
-                               lock (typeof (func_extensions))
+                               lock (typeof (FuncExtensions))
                                {
                                    if (null == the_implementation)
                                    {
trunk/product/MyMoney/MyMoney.csproj
@@ -224,6 +224,7 @@
     <Compile Include="Infrastructure\transactions2\Context.cs" />
     <Compile Include="Infrastructure\transactions2\Database.cs" />
     <Compile Include="Infrastructure\transactions2\DatabaseConfiguration.cs" />
+    <Compile Include="Infrastructure\transactions2\DatabaseConnection.cs" />
     <Compile Include="Infrastructure\transactions2\EmptyUnitOfWork.cs" />
     <Compile Include="Infrastructure\transactions2\IChangeTracker.cs" />
     <Compile Include="Infrastructure\transactions2\IChangeTrackerFactory.cs" />
@@ -687,7 +688,7 @@
     <Compile Include="Utility\Extensions\configuration_extensions.cs" />
     <Compile Include="Utility\Extensions\ConversionExtensions.cs" />
     <Compile Include="Utility\Extensions\EnumerableExtensions.cs" />
-    <Compile Include="Utility\Extensions\func_extensions.cs" />
+    <Compile Include="Utility\Extensions\FuncExtensions.cs" />
     <Compile Include="Utility\Extensions\mapping_extensions.cs" />
     <Compile Include="Utility\Extensions\mapping_extensions_specs.cs" />
     <Compile Include="Utility\Extensions\numeric_conversions.cs" />