Commit 2177d0b

mo_khan <mo@mokhan.ca>
2009-05-13 03:03:19
updated gorilla references
1 parent 2e8344d
build/lib/app/gorilla/gorilla.commons.infrastructure.dll
Binary file
build/lib/app/gorilla/gorilla.commons.infrastructure.thirdparty.dll
Binary file
build/lib/app/gorilla/gorilla.commons.utility.dll
Binary file
build/lib/app/gorilla/gorilla.commons.windows.forms.dll
Binary file
build/lib/app/gorilla/gorilla.commons.windows.forms.thirdparty.dll
Binary file
product/MoMoney.DataAccess/Db40/ConfigureObjectContainerStep.cs
@@ -0,0 +1,22 @@
+using Db4objects.Db4o;
+using Db4objects.Db4o.Events;
+using Gorilla.Commons.Infrastructure.Logging;
+using Gorilla.Commons.Utility.Core;
+
+namespace MoMoney.DataAccess.Db40
+{
+    public interface IConfigureObjectContainerStep : IConfiguration<IObjectContainer>
+    {
+    }
+
+    public class ConfigureObjectContainerStep : IConfigureObjectContainerStep
+    {
+        public void configure(IObjectContainer item)
+        {
+            var registry = EventRegistryFactory.ForObjectContainer(item);
+            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);
+        }
+    }
+}
\ No newline at end of file
product/MoMoney.DataAccess/Db40/ConnectionFactory.cs
@@ -1,37 +1,34 @@
-using Db4objects.Db4o;
-using Db4objects.Db4o.Config;
-using Gorilla.Commons.Infrastructure.FileSystem;
-using Gorilla.Commons.Infrastructure.Transactions;
-
-namespace MoMoney.DataAccess.Db40
-{
-    public class ConnectionFactory : IConnectionFactory
-    {
-        readonly IConfigureDatabaseStep setup;
-
-        public ConnectionFactory(IConfigureDatabaseStep setup)
-        {
-            this.setup = setup;
-        }
-
-        public IDatabaseConnection open_connection_to(IFile the_path_to_the_database_file)
-        {
-            var configuration = Db4oFactory.NewConfiguration();
-            setup.configure(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.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;
-        }
-    }
+using Db4objects.Db4o;
+using Db4objects.Db4o.Config;
+using Gorilla.Commons.Infrastructure.FileSystem;
+using Gorilla.Commons.Infrastructure.Transactions;
+using Gorilla.Commons.Utility.Extensions;
+
+namespace MoMoney.DataAccess.Db40
+{
+    public class ConnectionFactory : IConnectionFactory
+    {
+        readonly IConfigureDatabaseStep setup;
+        readonly IConfigureObjectContainerStep setup_container;
+
+        public ConnectionFactory(IConfigureDatabaseStep setup, IConfigureObjectContainerStep setup_container)
+        {
+            this.setup = setup;
+            this.setup_container = setup_container;
+        }
+
+        public IDatabaseConnection open_connection_to(IFile the_path_to_the_database_file)
+        {
+            var configuration = Db4oFactory.NewConfiguration();
+            setup.configure(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)
+        {
+            return Db4oFactory
+                .OpenFile(configuration, the_path_to_the_database_file.path)
+                .and_configure_with(setup_container);
+        }
+    }
 }
\ No newline at end of file
product/MoMoney.DataAccess/MoMoney.DataAccess.csproj
@@ -1,113 +1,114 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>9.0.30729</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>MoMoney.DataAccess</RootNamespace>
-    <AssemblyName>MoMoney.DataAccess</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
-    </Reference>
-    <Reference Include="Db4objects.Db4o, Version=7.5.57.11498, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\app\db40\Db4objects.Db4o.dll</HintPath>
-    </Reference>
-    <Reference Include="Db4objects.Db4o.Linq, Version=7.5.57.11498, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\app\db40\Db4objects.Db4o.Linq.dll</HintPath>
-    </Reference>
-    <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
-    </Reference>
-    <Reference Include="gorilla.commons.infrastructure, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
-    </Reference>
-    <Reference Include="gorilla.commons.utility, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.utility.dll</HintPath>
-    </Reference>
-    <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
-    </Reference>
-    <Reference Include="MbUnit.Framework, Version=2.4.2.175, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\test\mbunit\MbUnit.Framework.dll</HintPath>
-    </Reference>
-    <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Xml.Linq">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data.DataSetExtensions">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Db40\Spiking\db40_spike_specs.cs" />
-    <Compile Include="Repositories\AccountHolderRepository.cs" />
-    <Compile Include="Repositories\BillRepository.cs" />
-    <Compile Include="Repositories\CompanyRepository.cs" />
-    <Compile Include="Repositories\IncomeRepository.cs" />
-    <Compile Include="Db40\ConfigureDatabaseStep.cs" />
-    <Compile Include="Db40\ConnectionFactory.cs" />
-    <Compile Include="ObjectDatabase.cs" />
-    <Compile Include="Db40\DatabaseConnection.cs" />
-    <Compile Include="IConnectionFactory.cs" />
-    <Compile Include="IDatabaseConfiguration.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\MoMoney.Domain\MoMoney.Domain.csproj">
-      <Project>{BE790BCC-4412-473F-9D0A-5AA48FE7A74F}</Project>
-      <Name>MoMoney.Domain</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <Folder Include="Properties\" />
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>MoMoney.DataAccess</RootNamespace>
+    <AssemblyName>MoMoney.DataAccess</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="bdddoc, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\test\bdd.doc\bdddoc.dll</HintPath>
+    </Reference>
+    <Reference Include="Db4objects.Db4o, Version=7.5.57.11498, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\app\db40\Db4objects.Db4o.dll</HintPath>
+    </Reference>
+    <Reference Include="Db4objects.Db4o.Linq, Version=7.5.57.11498, Culture=neutral, PublicKeyToken=6199cd4f203aa8eb, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\app\db40\Db4objects.Db4o.Linq.dll</HintPath>
+    </Reference>
+    <Reference Include="developwithpassion.bdd, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\test\developwithpassion\developwithpassion.bdd.dll</HintPath>
+    </Reference>
+    <Reference Include="gorilla.commons.infrastructure, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
+    </Reference>
+    <Reference Include="gorilla.commons.utility, Version=2009.5.5.1633, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.utility.dll</HintPath>
+    </Reference>
+    <Reference Include="gorilla.testing, Version=2009.5.5.194, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\test\gorilla\gorilla.testing.dll</HintPath>
+    </Reference>
+    <Reference Include="MbUnit.Framework, Version=2.4.2.175, Culture=neutral, PublicKeyToken=5e72ecd30bc408d5">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\test\mbunit\MbUnit.Framework.dll</HintPath>
+    </Reference>
+    <Reference Include="Rhino.Mocks, Version=3.5.0.1337, Culture=neutral, PublicKeyToken=0b3305902db7183f, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\build\lib\test\rhino.mocks\Rhino.Mocks.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Db40\ConfigureObjectContainerStep.cs" />
+    <Compile Include="Db40\Spiking\db40_spike_specs.cs" />
+    <Compile Include="Repositories\AccountHolderRepository.cs" />
+    <Compile Include="Repositories\BillRepository.cs" />
+    <Compile Include="Repositories\CompanyRepository.cs" />
+    <Compile Include="Repositories\IncomeRepository.cs" />
+    <Compile Include="Db40\ConfigureDatabaseStep.cs" />
+    <Compile Include="Db40\ConnectionFactory.cs" />
+    <Compile Include="ObjectDatabase.cs" />
+    <Compile Include="Db40\DatabaseConnection.cs" />
+    <Compile Include="IConnectionFactory.cs" />
+    <Compile Include="IDatabaseConfiguration.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\MoMoney.Domain\MoMoney.Domain.csproj">
+      <Project>{BE790BCC-4412-473F-9D0A-5AA48FE7A74F}</Project>
+      <Name>MoMoney.Domain</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Properties\" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
 </Project>
\ No newline at end of file
product/MyMoney/boot/container/registration/wire_up_the_data_access_components_into_the.cs
@@ -35,6 +35,7 @@ namespace MoMoney.boot.container.registration
             register.transient<IStatementRegistry, StatementRegistry>();
             register.transient<IConnectionFactory, ConnectionFactory>();
             register.transient<IConfigureDatabaseStep, ConfigureDatabaseStep>();
+            register.transient<IConfigureObjectContainerStep, ConfigureObjectContainerStep>();
             register.transient<IPrototype, Prototype>();
         }
     }