Commit 9d86ea6
Changed files (79)
product
Boot
boot
container
registration
proxy_configuration
domain.services
Properties
DTO
Presentation
Model
Presenters
Views
Winforms
Views
Service
Infrastructure
Transactions
Service.Contracts
Infrastructure
Transactions
Updating
service.infrastructure
debugging
eventing
logging
Properties
security
threading
transactions
updating
product/Boot/boot/container/registration/proxy_configuration/UnitOfWorkInterceptor.cs
@@ -1,8 +1,7 @@
using Castle.Core.Interceptor;
using gorilla.commons.utility;
-using momoney.service.contracts.infrastructure.transactions;
-using MoMoney.Service.Contracts.Infrastructure.Transactions;
using MoMoney.Service.Infrastructure.Eventing;
+using momoney.service.infrastructure.transactions;
namespace MoMoney.boot.container.registration.proxy_configuration
{
product/Boot/boot/container/registration/wire_up_the_data_access_components_into_the.cs
@@ -6,7 +6,7 @@ using MoMoney.boot.container.registration.proxy_configuration;
using momoney.database;
using momoney.database.db4o;
using momoney.database.transactions;
-using MoMoney.Service.Contracts.Infrastructure.Transactions;
+using momoney.service.infrastructure.transactions;
using MoMoney.Service.Infrastructure.Transactions;
namespace MoMoney.boot.container.registration
product/Boot/Boot.csproj
@@ -223,6 +223,10 @@
<Project>{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}</Project>
<Name>presentation</Name>
</ProjectReference>
+ <ProjectReference Include="..\service.infrastructure\service.infrastructure.csproj">
+ <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
+ <Name>service.infrastructure</Name>
+ </ProjectReference>
<ProjectReference Include="..\Service\service.csproj">
<Project>{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}</Project>
<Name>service</Name>
product/domain.services/Properties/AssemblyInfo.cs
@@ -0,0 +1,39 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+
+[assembly: AssemblyTitle("domain.services")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("domain.services")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+
+[assembly: Guid("6ef1a8b6-ae56-478d-bfb8-54146271b9a3")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
product/domain.services/domain.services.csproj
@@ -0,0 +1,58 @@
+<?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>{F04F922F-C0CC-45FC-BD33-A758BD1B8B36}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>domain.services</RootNamespace>
+ <AssemblyName>domain.services</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="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="Properties\AssemblyInfo.cs" />
+ </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/DTO/DTO.csproj
@@ -49,7 +49,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AddNewBillDTO.cs" />
- <Compile Include="ApplicationVersion.cs" />
<Compile Include="BillInformationDto.cs" />
<Compile Include="CompanyDTO.cs" />
<Compile Include="IncomeSubmissionDTO.cs" />
product/Presentation/Model/Projects/ProjectController.cs
@@ -2,9 +2,9 @@ using Gorilla.Commons.Infrastructure.FileSystem;
using Gorilla.Commons.Infrastructure.Logging;
using gorilla.commons.utility;
using momoney.presentation.model.eventing;
-using MoMoney.Service.Contracts.Infrastructure;
-using momoney.service.contracts.infrastructure.transactions;
+using momoney.service.infrastructure;
using MoMoney.Service.Infrastructure.Eventing;
+using momoney.service.infrastructure.transactions;
namespace MoMoney.Presentation.Model.Projects
{
product/Presentation/Model/Projects/ProjectControllerSpecs.cs
@@ -4,193 +4,194 @@ using Gorilla.Commons.Infrastructure.FileSystem;
using Gorilla.Commons.Testing;
using gorilla.commons.utility;
using momoney.presentation.model.eventing;
-using MoMoney.Service.Contracts.Infrastructure;
-using momoney.service.contracts.infrastructure.transactions;
+using momoney.service.infrastructure;
using MoMoney.Service.Infrastructure.Eventing;
+using momoney.service.infrastructure.transactions;
namespace MoMoney.Presentation.Model.Projects
{
- public class ProjectControllerSpecs {}
-
- [Concern(typeof (ProjectController))]
- public abstract class behaves_like_a_project : concerns_for<IProjectController, ProjectController>
+ public class ProjectControllerSpecs
{
- context c = () =>
+ [Concern(typeof (ProjectController))]
+ public abstract class behaves_like_a_project : concerns_for<IProjectController, ProjectController>
{
- broker = the_dependency<IEventAggregator>();
- tasks = the_dependency<IProjectTasks>();
- };
-
- static protected IEventAggregator broker;
- static protected IProjectTasks tasks;
- }
+ context c = () =>
+ {
+ broker = the_dependency<IEventAggregator>();
+ tasks = the_dependency<IProjectTasks>();
+ };
- public class when_saving_the_current_project : behaves_like_a_project
- {
- it should_notify_the_rest_of_the_application = () => broker.was_told_to(x => x.publish<SavedChangesEvent>());
+ static protected IEventAggregator broker;
+ static protected IProjectTasks tasks;
+ }
- context c = () =>
+ public class when_saving_the_current_project : behaves_like_a_project
{
- file_to_update = an<File>();
- when_the(file_to_update).is_told_to(x => x.does_the_file_exist()).it_will_return(true);
- };
+ it should_notify_the_rest_of_the_application = () => broker.was_told_to(x => x.publish<SavedChangesEvent>());
- because b = () =>
- {
- sut.open_project_from(file_to_update);
- sut.save_changes();
- };
+ context c = () =>
+ {
+ file_to_update = an<File>();
+ when_the(file_to_update).is_told_to(x => x.does_the_file_exist()).it_will_return(true);
+ };
- static File file_to_update;
- }
+ because b = () =>
+ {
+ sut.open_project_from(file_to_update);
+ sut.save_changes();
+ };
- public class when_attempting_to_save_the_changes_to_a_project_and_a_file_to_save_to_has_not_been_specified :
- behaves_like_a_project
- {
- it should_inform_the_user_of_an_error = () => the_call.should_have_thrown<FileNotSpecifiedException>();
+ static File file_to_update;
+ }
- because b = () =>
+ public class when_attempting_to_save_the_changes_to_a_project_and_a_file_to_save_to_has_not_been_specified :
+ behaves_like_a_project
{
- the_call = call.to(() => sut.save_changes());
- };
+ it should_inform_the_user_of_an_error = () => the_call.should_have_thrown<FileNotSpecifiedException>();
- static Action the_call;
- }
+ because b = () =>
+ {
+ the_call = call.to(() => sut.save_changes());
+ };
- public class when_specifying_a_new_path_to_save_an_opened_project_to : behaves_like_a_project
- {
- it should_save_the_current_database_to_the_new_path = () => tasks.was_told_to(x => x.copy_to("blah"));
+ static Action the_call;
+ }
- context c = () =>
+ public class when_specifying_a_new_path_to_save_an_opened_project_to : behaves_like_a_project
{
- original_file = an<File>();
- new_file = an<File>();
- when_the(new_file).is_told_to(x => x.path).it_will_return("blah");
- };
+ it should_save_the_current_database_to_the_new_path = () => tasks.was_told_to(x => x.copy_to("blah"));
- because b = () =>
- {
- sut.open_project_from(original_file);
- sut.save_project_to(new_file);
- };
+ context c = () =>
+ {
+ original_file = an<File>();
+ new_file = an<File>();
+ when_the(new_file).is_told_to(x => x.path).it_will_return("blah");
+ };
- static File original_file;
- static File new_file;
- }
+ because b = () =>
+ {
+ sut.open_project_from(original_file);
+ sut.save_project_to(new_file);
+ };
- public class when_attempting_to_open_an_invalid_project_file_path : behaves_like_a_project
- {
- it should_not_change_the_current_working_file = () => result.should_be_equal_to(false);
+ static File original_file;
+ static File new_file;
+ }
- context c = () =>
+ public class when_attempting_to_open_an_invalid_project_file_path : behaves_like_a_project
{
- invalid_file = an<File>();
- when_the(invalid_file).is_told_to(x => x.does_the_file_exist()).it_will_return(false);
- };
+ it should_not_change_the_current_working_file = () => result.should_be_equal_to(false);
- because b = () =>
- {
- sut.open_project_from(invalid_file);
- result = sut.has_been_saved_at_least_once();
- };
+ context c = () =>
+ {
+ invalid_file = an<File>();
+ when_the(invalid_file).is_told_to(x => x.does_the_file_exist()).it_will_return(false);
+ };
- static File invalid_file;
- static bool result;
- }
+ because b = () =>
+ {
+ sut.open_project_from(invalid_file);
+ result = sut.has_been_saved_at_least_once();
+ };
- public class when_attempting_to_save_all_changes_to_a_new_file_with_an_invalid_path : behaves_like_a_project
- {
- it should_not_change_the_current_file_to_the_invalid_one = () => result.should_be_equal_to(false);
+ static File invalid_file;
+ static bool result;
+ }
- context c = () =>
+ public class when_attempting_to_save_all_changes_to_a_new_file_with_an_invalid_path : behaves_like_a_project
{
- invalid_file = an<File>();
+ it should_not_change_the_current_file_to_the_invalid_one = () => result.should_be_equal_to(false);
- when_the(invalid_file).is_told_to(x => x.path).it_will_return(string.Empty);
- };
+ context c = () =>
+ {
+ invalid_file = an<File>();
- because b = () =>
- {
- sut.save_project_to(invalid_file);
- result = sut.has_been_saved_at_least_once();
- };
+ when_the(invalid_file).is_told_to(x => x.path).it_will_return(string.Empty);
+ };
- static File invalid_file;
- static bool result;
- }
+ because b = () =>
+ {
+ sut.save_project_to(invalid_file);
+ result = sut.has_been_saved_at_least_once();
+ };
- public class when_opening_a_new_file : behaves_like_a_project
- {
- context c = () =>
- {
- file = an<File>();
- when_the(file).is_told_to(x => x.does_the_file_exist()).it_will_return(true);
- };
+ static File invalid_file;
+ static bool result;
+ }
- because b = () => sut.open_project_from(file);
+ public class when_opening_a_new_file : behaves_like_a_project
+ {
+ context c = () =>
+ {
+ file = an<File>();
+ when_the(file).is_told_to(x => x.does_the_file_exist()).it_will_return(true);
+ };
- static File file;
- }
+ because b = () => sut.open_project_from(file);
- public class when_checking_if_there_are_any_unsaved_changes_and_a_project_is_not_open : behaves_like_a_project
- {
- it should_return_false = () => result.should_be_equal_to(false);
+ static File file;
+ }
- because b = () =>
+ public class when_checking_if_there_are_any_unsaved_changes_and_a_project_is_not_open : behaves_like_a_project
{
- result = sut.has_unsaved_changes();
- };
+ it should_return_false = () => result.should_be_equal_to(false);
- static bool result;
- }
+ because b = () =>
+ {
+ result = sut.has_unsaved_changes();
+ };
- public class when_checking_if_there_are_any_unsaved_changes_and_there_are : behaves_like_a_project
- {
- it should_return_true = () => result.should_be_true();
+ static bool result;
+ }
- context c = () =>
+ public class when_checking_if_there_are_any_unsaved_changes_and_there_are : behaves_like_a_project
{
- unit_of_work = an<IUnitOfWork>();
- when_the(unit_of_work).is_told_to(x => x.is_dirty()).it_will_return(true);
- };
+ it should_return_true = () => result.should_be_true();
- because b = () =>
- {
- sut.downcast_to<ProjectController>().run(unit_of_work);
- result = sut.has_unsaved_changes();
- };
+ context c = () =>
+ {
+ unit_of_work = an<IUnitOfWork>();
+ when_the(unit_of_work).is_told_to(x => x.is_dirty()).it_will_return(true);
+ };
- static bool result;
- static IUnitOfWork unit_of_work;
- }
+ because b = () =>
+ {
+ sut.downcast_to<ProjectController>().run(unit_of_work);
+ result = sut.has_unsaved_changes();
+ };
- public class when_starting_a_new_project_and_a_project_was_already_open : behaves_like_a_project
- {
- it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<ClosingProjectEvent>());
+ static bool result;
+ static IUnitOfWork unit_of_work;
+ }
- because b = () =>
+ public class when_starting_a_new_project_and_a_project_was_already_open : behaves_like_a_project
{
- sut.start_new_project();
- sut.start_new_project();
- };
- }
+ it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<ClosingProjectEvent>());
- public class when_opening_an_existing_project_and_a_project_was_already_open : behaves_like_a_project
- {
- it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<ClosingProjectEvent>());
+ because b = () =>
+ {
+ sut.start_new_project();
+ sut.start_new_project();
+ };
+ }
- context c = () =>
+ public class when_opening_an_existing_project_and_a_project_was_already_open : behaves_like_a_project
{
- file = an<File>();
- when_the(file).is_told_to(x => x.does_the_file_exist()).it_will_return(true);
- };
+ it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<ClosingProjectEvent>());
- because b = () =>
- {
- sut.open_project_from(file);
- sut.start_new_project();
- };
+ context c = () =>
+ {
+ file = an<File>();
+ when_the(file).is_told_to(x => x.does_the_file_exist()).it_will_return(true);
+ };
+
+ because b = () =>
+ {
+ sut.open_project_from(file);
+ sut.start_new_project();
+ };
- static File file;
+ static File file;
+ }
}
}
\ No newline at end of file
product/Presentation/Presenters/CheckForUpdatesPresenter.cs
@@ -1,12 +1,10 @@
using Gorilla.Commons.Infrastructure.Logging;
using gorilla.commons.utility;
using Gorilla.Commons.Utility;
-using MoMoney.DTO;
using MoMoney.Presentation.Core;
using MoMoney.Presentation.Presenters;
using momoney.presentation.views;
-using momoney.service.contracts.infrastructure.updating;
-using MoMoney.Service.Contracts.Infrastructure.Updating;
+using momoney.service.infrastructure.updating;
namespace momoney.presentation.presenters
{
product/Presentation/Presenters/CheckForUpdatesPresenterSpecs.cs
@@ -2,11 +2,9 @@ using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
using gorilla.commons.utility;
using Gorilla.Commons.Utility;
-using MoMoney.DTO;
using MoMoney.Presentation.Presenters;
using momoney.presentation.views;
-using momoney.service.contracts.infrastructure.updating;
-using MoMoney.Service.Contracts.Infrastructure.Updating;
+using momoney.service.infrastructure.updating;
namespace momoney.presentation.presenters
{
product/Presentation/Presenters/LogFilePresenter.cs
@@ -1,6 +1,6 @@
using MoMoney.Presentation.Core;
using momoney.presentation.views;
-using MoMoney.Service.Contracts.Infrastructure.Logging;
+using momoney.service.infrastructure.logging;
namespace momoney.presentation.presenters
{
product/Presentation/Presenters/LogFileViewPresenterSpecs.cs
@@ -1,7 +1,7 @@
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
using momoney.presentation.views;
-using MoMoney.Service.Contracts.Infrastructure.Logging;
+using momoney.service.infrastructure.logging;
namespace momoney.presentation.presenters
{
product/Presentation/Views/ICheckForUpdatesView.cs
@@ -1,7 +1,7 @@
using gorilla.commons.utility;
using Gorilla.Commons.Utility;
-using MoMoney.DTO;
using momoney.presentation.presenters;
+using momoney.service.infrastructure.updating;
namespace momoney.presentation.views
{
product/Presentation/Winforms/Views/CheckForUpdatesView.cs
@@ -2,11 +2,11 @@ using System;
using System.Reflection;
using System.Windows.Forms;
using Gorilla.Commons.Utility;
-using MoMoney.DTO;
using momoney.presentation.presenters;
using momoney.presentation.views;
using MoMoney.Presentation.Views;
using MoMoney.Presentation.Winforms.Resources;
+using momoney.service.infrastructure.updating;
namespace MoMoney.Presentation.Winforms.Views
{
@@ -38,12 +38,12 @@ namespace MoMoney.Presentation.Winforms.Views
public void attach_to(ICheckForUpdatesPresenter presenter)
{
update_button = x =>
- {
- ux_update_button.Enabled = false;
- ux_dont_update_button.Enabled = false;
- ux_cancel_button.Enabled = true;
- presenter.begin_update();
- };
+ {
+ ux_update_button.Enabled = false;
+ ux_dont_update_button.Enabled = false;
+ ux_cancel_button.Enabled = true;
+ presenter.begin_update();
+ };
dont_update_button = x => presenter.do_not_update();
cancel_button = x => presenter.cancel_update();
}
@@ -60,13 +60,13 @@ namespace MoMoney.Presentation.Winforms.Views
{
shell.region<ToolStripProgressBar>(
x =>
+ {
+ while (percentage_complete.is_less_than(x.Value))
{
- while (percentage_complete.is_less_than(x.Value))
- {
- if (percentage_complete.represents(x.Value)) break;
- x.PerformStep();
- }
- });
+ if (percentage_complete.represents(x.Value)) break;
+ x.PerformStep();
+ }
+ });
}
public void update_complete()
product/Presentation/Presentation.csproj
@@ -538,9 +538,9 @@
<Project>{41D2B68B-031B-44FF-BAC5-7752D9E29F94}</Project>
<Name>service.contracts</Name>
</ProjectReference>
- <ProjectReference Include="..\Service\service.csproj">
- <Project>{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}</Project>
- <Name>service</Name>
+ <ProjectReference Include="..\service.infrastructure\service.infrastructure.csproj">
+ <Project>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</Project>
+ <Name>service.infrastructure</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
product/Service/Infrastructure/Transactions/UnitOfWorkFactorySpecs.cs
@@ -1,80 +0,0 @@
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Testing;
-using momoney.database.transactions;
-using momoney.service.contracts.infrastructure.transactions;
-using MoMoney.Service.Contracts.Infrastructure.Transactions;
-
-namespace MoMoney.Service.Infrastructure.Transactions
-{
- public class UnitOfWorkFactorySpecs
- {
- }
-
- [Concern(typeof (UnitOfWorkFactory))]
- public abstract class concerns_for_unit_of_work_factory : concerns_for<IUnitOfWorkFactory, UnitOfWorkFactory>
- {
- context c = () =>
- {
- session_context = the_dependency<IContext>();
- factory = the_dependency<ISessionFactory>();
- key = the_dependency<IKey<ISession>>();
- };
-
- static protected IContext session_context;
- static protected ISessionFactory factory;
- static protected IKey<ISession> key;
- }
-
- [Concern(typeof (UnitOfWorkFactory))]
- public class when_a_unit_of_work_has_not_been_started : concerns_for_unit_of_work_factory
- {
- context c = () => { when_the(session_context).is_told_to(x => x.contains(key)).it_will_return(false); };
- }
-
- [Concern(typeof (UnitOfWorkFactory))]
- public class when_a_unit_of_work_has_been_started : concerns_for_unit_of_work_factory
- {
- context c = () => { when_the(session_context).is_told_to(x => x.contains(key)).it_will_return(true); };
- }
-
- [Concern(typeof (UnitOfWorkFactory))]
- public class when_creating_a_new_unit_of_work : when_a_unit_of_work_has_not_been_started
- {
- context c = () =>
- {
- session = an<ISession>();
- when_the(factory).is_told_to(x => x.create()).it_will_return(session);
- };
-
- because b = () => { result = sut.create(); };
-
- it should_create_a_new_unit_of_work = () => factory.was_told_to(x => x.create());
-
- it should_add_the_session_to_the_current_context = () => session_context.was_told_to(x => x.add(key, session));
-
- it should_return_a_brand_new_unit_of_work = () =>
- {
- result.should_not_be_null();
- result.should_be_an_instance_of<UnitOfWork>();
- };
-
- static IUnitOfWork result;
- static ISession session;
- }
-
- [Concern(typeof (UnitOfWorkFactory))]
- public class when_attempting_to_create_a_new_unit_of_work : when_a_unit_of_work_has_been_started
- {
- because b = () => { result = sut.create(); };
-
- it should_not_create_a_new_unit_of_work = () => factory.was_not_told_to(x => x.create());
-
- it should_return_an_empty_unit_of_work = () =>
- {
- result.should_not_be_null();
- result.should_be_an_instance_of<EmptyUnitOfWork>();
- };
-
- static IUnitOfWork result;
- }
-}
\ No newline at end of file
product/Service/Infrastructure/Transactions/UnitOfWorkSpecs.cs
@@ -1,68 +0,0 @@
-using developwithpassion.bdd.contexts;
-using Gorilla.Commons.Testing;
-using momoney.database.transactions;
-using momoney.service.contracts.infrastructure.transactions;
-
-namespace MoMoney.Service.Infrastructure.Transactions
-{
- public class UnitOfWorkSpecs
- {
- }
-
- [Concern(typeof (UnitOfWork))]
- public abstract class behaves_like_unit_of_work : concerns_for<IUnitOfWork, UnitOfWork>
- {
- context c = () =>
- {
- session_context = the_dependency<IContext>();
- session = the_dependency<ISession>();
- key = the_dependency<IKey<ISession>>();
- };
-
- static protected IContext session_context;
- static protected ISession session;
- static protected IKey<ISession> key;
- }
-
- [Concern(typeof (UnitOfWork))]
- public abstract class when_a_unit_of_work_has_unsaved_changes : behaves_like_unit_of_work
- {
- context c = () => when_the(session).is_told_to(x => x.is_dirty()).it_will_return(true);
- }
-
- [Concern(typeof (UnitOfWork))]
- public abstract class when_a_unit_of_work_has_no_changes : behaves_like_unit_of_work
- {
- context c = () => when_the(session).is_told_to(x => x.is_dirty()).it_will_return(false);
- }
-
- [Concern(typeof (UnitOfWork))]
- public class when_checking_if_a_unit_of_work_has_any_unsaved_changes : when_a_unit_of_work_has_unsaved_changes
- {
- it should_return_true = () => result.should_be_true();
- because b = () => { result = sut.is_dirty(); };
- static bool result;
- }
-
- [Concern(typeof (UnitOfWork))]
- public class when_commiting_a_unit_of_work : when_a_unit_of_work_has_unsaved_changes
- {
- it should_flush_the_current_session = () => session.was_told_to(x => x.flush());
- because b = () => sut.commit();
- }
-
- [Concern(typeof (UnitOfWork))]
- public class when_attempting_to_commit_a_unit_of_work : when_a_unit_of_work_has_no_changes
- {
- it should_not_flush_the_session = () => session.was_not_told_to(x => x.flush());
- because b = () => sut.commit();
- }
-
- [Concern(typeof (UnitOfWork))]
- public class when_disposing_of_a_unit_of_work : behaves_like_unit_of_work
- {
- it should_dispose_the_session = () => session.was_told_to(x => x.Dispose());
- it should_remove_the_session_from_the_current_context = () => session_context.was_told_to(x => x.remove(key));
- because b = () => sut.Dispose();
- }
-}
\ No newline at end of file
product/Service/Service.csproj
@@ -98,55 +98,6 @@
<Compile Include="application\IEventLog.cs" />
<Compile Include="application\RegisterNewCompanyCommand.cs" />
<Compile Include="application\SaveNewBillCommand.cs" />
- <Compile Include="infrastructure\eventing\EventAggregator.cs" />
- <Compile Include="infrastructure\eventing\EventAggregatorSpecs.cs" />
- <Compile Include="infrastructure\eventing\IEvent.cs" />
- <Compile Include="infrastructure\eventing\IEventAggregator.cs" />
- <Compile Include="infrastructure\eventing\IEventSubscriber.cs" />
- <Compile Include="infrastructure\logging\LogFileTasks.cs" />
- <Compile Include="infrastructure\ProjectTasks.cs" />
- <Compile Include="infrastructure\security\IsInRole.cs" />
- <Compile Include="infrastructure\security\IsInRoleSpecs.cs" />
- <Compile Include="infrastructure\security\Role.cs" />
- <Compile Include="infrastructure\threading\AsynchronousCommandProcessor.cs" />
- <Compile Include="infrastructure\threading\BackgroundThread.cs" />
- <Compile Include="infrastructure\threading\BackgroundThreadFactory.cs" />
- <Compile Include="infrastructure\threading\BackgroundThreadFactorySpecs.cs" />
- <Compile Include="infrastructure\threading\BackgroundThreadSpecs.cs" />
- <Compile Include="infrastructure\threading\CommandProcessor.cs" />
- <Compile Include="infrastructure\threading\CommandProcessorSpecs.cs" />
- <Compile Include="infrastructure\threading\ICommandProcessor.cs" />
- <Compile Include="infrastructure\threading\IntervalTimer.cs" />
- <Compile Include="infrastructure\threading\IntervalTimerSpecs.cs" />
- <Compile Include="infrastructure\threading\ITimerClient.cs" />
- <Compile Include="infrastructure\threading\IWorkerThread.cs" />
- <Compile Include="infrastructure\threading\RaiseEventInterceptor.cs" />
- <Compile Include="infrastructure\threading\RunOnBackgroundThreadInterceptor.cs" />
- <Compile Include="infrastructure\threading\RunOnBackgroundThreadInterceptorSpecs.cs" />
- <Compile Include="infrastructure\threading\RunOnUIThread.cs" />
- <Compile Include="infrastructure\threading\SynchronizationContextFactory.cs" />
- <Compile Include="infrastructure\threading\SynchronizedCommand.cs" />
- <Compile Include="infrastructure\threading\SynchronizedContext.cs" />
- <Compile Include="infrastructure\threading\Synchronizer.cs" />
- <Compile Include="infrastructure\threading\ThreadingExtensions.cs" />
- <Compile Include="infrastructure\threading\TimerFactory.cs" />
- <Compile Include="infrastructure\threading\TimerFactorySpecs.cs" />
- <Compile Include="infrastructure\threading\WorkerThread.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="infrastructure\threading\WorkItem.cs" />
- <Compile Include="infrastructure\transactions\EmptyUnitOfWork.cs" />
- <Compile Include="infrastructure\transactions\UnitOfWork.cs" />
- <Compile Include="infrastructure\transactions\UnitOfWorkFactory.cs" />
- <Compile Include="infrastructure\transactions\UnitOfWorkFactorySpecs.cs" />
- <Compile Include="infrastructure\transactions\UnitOfWorkSpecs.cs" />
- <Compile Include="infrastructure\updating\CancelUpdate.cs" />
- <Compile Include="infrastructure\updating\CancelUpdateSpecs.cs" />
- <Compile Include="infrastructure\updating\CurrentDeployment.cs" />
- <Compile Include="infrastructure\updating\DownloadTheLatestVersion.cs" />
- <Compile Include="infrastructure\updating\IDeployment.cs" />
- <Compile Include="infrastructure\updating\NullDeployment.cs" />
- <Compile Include="infrastructure\updating\WhatIsTheAvailableVersion.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\database\database.csproj">
@@ -167,7 +118,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <Folder Include="domain\" />
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
product/Service.Contracts/Infrastructure/Transactions/IUnitOfWorkFactory.cs
@@ -1,7 +0,0 @@
-using gorilla.commons.utility;
-using momoney.service.contracts.infrastructure.transactions;
-
-namespace MoMoney.Service.Contracts.Infrastructure.Transactions
-{
- public interface IUnitOfWorkFactory : Factory<IUnitOfWork> {}
-}
\ No newline at end of file
product/Service.Contracts/Infrastructure/Updating/IWhatIsTheAvailableVersion.cs
@@ -1,9 +0,0 @@
-using gorilla.commons.utility;
-using MoMoney.DTO;
-
-namespace MoMoney.Service.Contracts.Infrastructure.Updating
-{
- public interface IWhatIsTheAvailableVersion : Query<ApplicationVersion>
- {
- }
-}
\ No newline at end of file
product/Service.Contracts/Service.Contracts.csproj
@@ -62,13 +62,6 @@
<Compile Include="application\IGetAllIncomeQuery.cs" />
<Compile Include="application\IRegisterNewCompanyCommand.cs" />
<Compile Include="application\ISaveNewBillCommand.cs" />
- <Compile Include="infrastructure\IProjectTasks.cs" />
- <Compile Include="infrastructure\logging\ILogFileTasks.cs" />
- <Compile Include="infrastructure\transactions\IUnitOfWork.cs" />
- <Compile Include="infrastructure\transactions\IUnitOfWorkFactory.cs" />
- <Compile Include="infrastructure\updating\ICancelUpdate.cs" />
- <Compile Include="infrastructure\updating\IDownloadTheLatestVersion.cs" />
- <Compile Include="infrastructure\updating\IWhatIsTheAvailableVersion.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
@@ -77,9 +70,6 @@
<Name>dto</Name>
</ProjectReference>
</ItemGroup>
- <ItemGroup>
- <Folder Include="domain\" />
- </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.
product/Service/Infrastructure/debugging/Launch.cs → product/service.infrastructure/debugging/Launch.cs
File renamed without changes
product/Service/Infrastructure/Eventing/EventAggregator.cs → product/service.infrastructure/eventing/EventAggregator.cs
File renamed without changes
product/Service/Infrastructure/Eventing/EventAggregatorSpecs.cs → product/service.infrastructure/eventing/EventAggregatorSpecs.cs
File renamed without changes
product/Service/Infrastructure/Eventing/IEvent.cs → product/service.infrastructure/eventing/IEvent.cs
File renamed without changes
product/Service/Infrastructure/Eventing/IEventAggregator.cs → product/service.infrastructure/eventing/IEventAggregator.cs
File renamed without changes
product/Service/Infrastructure/Eventing/IEventSubscriber.cs → product/service.infrastructure/eventing/IEventSubscriber.cs
File renamed without changes
product/Service.Contracts/Infrastructure/Logging/ILogFileTasks.cs → product/service.infrastructure/logging/ILogFileTasks.cs
@@ -1,4 +1,4 @@
-namespace MoMoney.Service.Contracts.Infrastructure.Logging
+namespace momoney.service.infrastructure.logging
{
public interface ILogFileTasks
{
product/Service/Infrastructure/Logging/LogFileTasks.cs → product/service.infrastructure/logging/LogFileTasks.cs
@@ -1,6 +1,6 @@
using System.IO;
using Gorilla.Commons.Infrastructure.Reflection;
-using MoMoney.Service.Contracts.Infrastructure.Logging;
+using momoney.service.infrastructure.logging;
namespace MoMoney.Service.Infrastructure.Logging
{
product/service.infrastructure/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("service.infrastructure")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("service.infrastructure")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bdd7cf69-df1f-4dab-a401-e66b3109c05c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
product/Service/Infrastructure/Security/IsInRole.cs → product/service.infrastructure/security/IsInRole.cs
File renamed without changes
product/Service/Infrastructure/Security/IsInRoleSpecs.cs → product/service.infrastructure/security/IsInRoleSpecs.cs
File renamed without changes
product/Service/Infrastructure/Security/Role.cs → product/service.infrastructure/security/Role.cs
File renamed without changes
product/Service/Infrastructure/Threading/AsynchronousCommandProcessor.cs → product/service.infrastructure/threading/AsynchronousCommandProcessor.cs
File renamed without changes
product/Service/Infrastructure/Threading/BackgroundThread.cs → product/service.infrastructure/threading/BackgroundThread.cs
File renamed without changes
product/Service/Infrastructure/Threading/BackgroundThreadFactory.cs → product/service.infrastructure/threading/BackgroundThreadFactory.cs
File renamed without changes
product/Service/Infrastructure/Threading/BackgroundThreadFactorySpecs.cs → product/service.infrastructure/threading/BackgroundThreadFactorySpecs.cs
File renamed without changes
product/Service/Infrastructure/Threading/BackgroundThreadSpecs.cs → product/service.infrastructure/threading/BackgroundThreadSpecs.cs
File renamed without changes
product/Service/Infrastructure/Threading/CommandProcessor.cs → product/service.infrastructure/threading/CommandProcessor.cs
File renamed without changes
product/Service/Infrastructure/Threading/CommandProcessorSpecs.cs → product/service.infrastructure/threading/CommandProcessorSpecs.cs
File renamed without changes
product/Service/Infrastructure/Threading/ICommandProcessor.cs → product/service.infrastructure/threading/ICommandProcessor.cs
File renamed without changes
product/Service/Infrastructure/Threading/IntervalTimer.cs → product/service.infrastructure/threading/IntervalTimer.cs
File renamed without changes
product/Service/Infrastructure/Threading/IntervalTimerSpecs.cs → product/service.infrastructure/threading/IntervalTimerSpecs.cs
File renamed without changes
product/Service/Infrastructure/Threading/ITimerClient.cs → product/service.infrastructure/threading/ITimerClient.cs
File renamed without changes
product/Service/Infrastructure/Threading/IWorkerThread.cs → product/service.infrastructure/threading/IWorkerThread.cs
File renamed without changes
product/Service/Infrastructure/Threading/RaiseEventInterceptor.cs → product/service.infrastructure/threading/RaiseEventInterceptor.cs
File renamed without changes
product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptor.cs → product/service.infrastructure/threading/RunOnBackgroundThreadInterceptor.cs
File renamed without changes
product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptorSpecs.cs → product/service.infrastructure/threading/RunOnBackgroundThreadInterceptorSpecs.cs
File renamed without changes
product/Service/Infrastructure/Threading/RunOnUIThread.cs → product/service.infrastructure/threading/RunOnUIThread.cs
File renamed without changes
product/Service/Infrastructure/Threading/SynchronizationContextFactory.cs → product/service.infrastructure/threading/SynchronizationContextFactory.cs
File renamed without changes
product/Service/Infrastructure/Threading/SynchronizedCommand.cs → product/service.infrastructure/threading/SynchronizedCommand.cs
File renamed without changes
product/Service/Infrastructure/Threading/SynchronizedContext.cs → product/service.infrastructure/threading/SynchronizedContext.cs
File renamed without changes
product/Service/Infrastructure/Threading/Synchronizer.cs → product/service.infrastructure/threading/Synchronizer.cs
File renamed without changes
product/Service/Infrastructure/Threading/ThreadingExtensions.cs → product/service.infrastructure/threading/ThreadingExtensions.cs
File renamed without changes
product/Service/Infrastructure/Threading/TimerFactory.cs → product/service.infrastructure/threading/TimerFactory.cs
File renamed without changes
product/Service/Infrastructure/Threading/TimerFactorySpecs.cs → product/service.infrastructure/threading/TimerFactorySpecs.cs
File renamed without changes
product/Service/Infrastructure/Threading/WorkerThread.cs → product/service.infrastructure/threading/WorkerThread.cs
File renamed without changes
product/Service/Infrastructure/Threading/WorkItem.cs → product/service.infrastructure/threading/WorkItem.cs
File renamed without changes
product/Service/Infrastructure/Transactions/EmptyUnitOfWork.cs → product/service.infrastructure/transactions/EmptyUnitOfWork.cs
@@ -1,5 +1,5 @@
using Gorilla.Commons.Infrastructure.Logging;
-using momoney.service.contracts.infrastructure.transactions;
+using momoney.service.infrastructure.transactions;
namespace MoMoney.Service.Infrastructure.Transactions
{
product/Service.Contracts/Infrastructure/Transactions/IUnitOfWork.cs → product/service.infrastructure/transactions/IUnitOfWork.cs
@@ -1,6 +1,6 @@
using System;
-namespace momoney.service.contracts.infrastructure.transactions
+namespace momoney.service.infrastructure.transactions
{
public interface IUnitOfWork : IDisposable
{
product/service.infrastructure/transactions/IUnitOfWorkFactory.cs
@@ -0,0 +1,6 @@
+using gorilla.commons.utility;
+
+namespace momoney.service.infrastructure.transactions
+{
+ public interface IUnitOfWorkFactory : Factory<IUnitOfWork> {}
+}
\ No newline at end of file
product/Service/Infrastructure/Transactions/UnitOfWork.cs → product/service.infrastructure/transactions/UnitOfWork.cs
@@ -1,5 +1,5 @@
using momoney.database.transactions;
-using momoney.service.contracts.infrastructure.transactions;
+using momoney.service.infrastructure.transactions;
namespace MoMoney.Service.Infrastructure.Transactions
{
product/Service/Infrastructure/Transactions/UnitOfWorkFactory.cs → product/service.infrastructure/transactions/UnitOfWorkFactory.cs
@@ -1,6 +1,5 @@
using momoney.database.transactions;
-using momoney.service.contracts.infrastructure.transactions;
-using MoMoney.Service.Contracts.Infrastructure.Transactions;
+using momoney.service.infrastructure.transactions;
namespace MoMoney.Service.Infrastructure.Transactions
{
product/service.infrastructure/transactions/UnitOfWorkFactorySpecs.cs
@@ -0,0 +1,90 @@
+using developwithpassion.bdd.contexts;
+using Gorilla.Commons.Testing;
+using momoney.database.transactions;
+using momoney.service.infrastructure.transactions;
+
+namespace MoMoney.Service.Infrastructure.Transactions
+{
+ public class UnitOfWorkFactorySpecs
+ {
+ [Concern(typeof (UnitOfWorkFactory))]
+ public abstract class concerns_for_unit_of_work_factory : concerns_for<IUnitOfWorkFactory, UnitOfWorkFactory>
+ {
+ context c = () =>
+ {
+ session_context = the_dependency<IContext>();
+ factory = the_dependency<ISessionFactory>();
+ key = the_dependency<IKey<ISession>>();
+ };
+
+ static protected IContext session_context;
+ static protected ISessionFactory factory;
+ static protected IKey<ISession> key;
+ }
+
+ [Concern(typeof (UnitOfWorkFactory))]
+ public class when_a_unit_of_work_has_not_been_started : concerns_for_unit_of_work_factory
+ {
+ context c = () =>
+ {
+ when_the(session_context).is_told_to(x => x.contains(key)).it_will_return(false);
+ };
+ }
+
+ [Concern(typeof (UnitOfWorkFactory))]
+ public class when_a_unit_of_work_has_been_started : concerns_for_unit_of_work_factory
+ {
+ context c = () =>
+ {
+ when_the(session_context).is_told_to(x => x.contains(key)).it_will_return(true);
+ };
+ }
+
+ [Concern(typeof (UnitOfWorkFactory))]
+ public class when_creating_a_new_unit_of_work : when_a_unit_of_work_has_not_been_started
+ {
+ context c = () =>
+ {
+ session = an<ISession>();
+ when_the(factory).is_told_to(x => x.create()).it_will_return(session);
+ };
+
+ because b = () =>
+ {
+ result = sut.create();
+ };
+
+ it should_create_a_new_unit_of_work = () => factory.was_told_to(x => x.create());
+
+ it should_add_the_session_to_the_current_context = () => session_context.was_told_to(x => x.add(key, session));
+
+ it should_return_a_brand_new_unit_of_work = () =>
+ {
+ result.should_not_be_null();
+ result.should_be_an_instance_of<UnitOfWork>();
+ };
+
+ static IUnitOfWork result;
+ static ISession session;
+ }
+
+ [Concern(typeof (UnitOfWorkFactory))]
+ public class when_attempting_to_create_a_new_unit_of_work : when_a_unit_of_work_has_been_started
+ {
+ because b = () =>
+ {
+ result = sut.create();
+ };
+
+ it should_not_create_a_new_unit_of_work = () => factory.was_not_told_to(x => x.create());
+
+ it should_return_an_empty_unit_of_work = () =>
+ {
+ result.should_not_be_null();
+ result.should_be_an_instance_of<EmptyUnitOfWork>();
+ };
+
+ static IUnitOfWork result;
+ }
+ }
+}
\ No newline at end of file
product/service.infrastructure/transactions/UnitOfWorkSpecs.cs
@@ -0,0 +1,72 @@
+using developwithpassion.bdd.contexts;
+using Gorilla.Commons.Testing;
+using momoney.database.transactions;
+using momoney.service.infrastructure.transactions;
+
+namespace MoMoney.Service.Infrastructure.Transactions
+{
+ public class UnitOfWorkSpecs
+ {
+ [Concern(typeof (UnitOfWork))]
+ public abstract class behaves_like_unit_of_work : concerns_for<IUnitOfWork, UnitOfWork>
+ {
+ context c = () =>
+ {
+ session_context = the_dependency<IContext>();
+ session = the_dependency<ISession>();
+ key = the_dependency<IKey<ISession>>();
+ };
+
+ static protected IContext session_context;
+ static protected ISession session;
+ static protected IKey<ISession> key;
+ }
+
+ [Concern(typeof (UnitOfWork))]
+ public abstract class when_a_unit_of_work_has_unsaved_changes : behaves_like_unit_of_work
+ {
+ context c = () => when_the(session).is_told_to(x => x.is_dirty()).it_will_return(true);
+ }
+
+ [Concern(typeof (UnitOfWork))]
+ public abstract class when_a_unit_of_work_has_no_changes : behaves_like_unit_of_work
+ {
+ context c = () => when_the(session).is_told_to(x => x.is_dirty()).it_will_return(false);
+ }
+
+ [Concern(typeof (UnitOfWork))]
+ public class when_checking_if_a_unit_of_work_has_any_unsaved_changes : when_a_unit_of_work_has_unsaved_changes
+ {
+ it should_return_true = () => result.should_be_true();
+
+ because b = () =>
+ {
+ result = sut.is_dirty();
+ };
+
+ static bool result;
+ }
+
+ [Concern(typeof (UnitOfWork))]
+ public class when_commiting_a_unit_of_work : when_a_unit_of_work_has_unsaved_changes
+ {
+ it should_flush_the_current_session = () => session.was_told_to(x => x.flush());
+ because b = () => sut.commit();
+ }
+
+ [Concern(typeof (UnitOfWork))]
+ public class when_attempting_to_commit_a_unit_of_work : when_a_unit_of_work_has_no_changes
+ {
+ it should_not_flush_the_session = () => session.was_not_told_to(x => x.flush());
+ because b = () => sut.commit();
+ }
+
+ [Concern(typeof (UnitOfWork))]
+ public class when_disposing_of_a_unit_of_work : behaves_like_unit_of_work
+ {
+ it should_dispose_the_session = () => session.was_told_to(x => x.Dispose());
+ it should_remove_the_session_from_the_current_context = () => session_context.was_told_to(x => x.remove(key));
+ because b = () => sut.Dispose();
+ }
+ }
+}
\ No newline at end of file
product/Service/Infrastructure/Updating/CancelUpdate.cs → product/service.infrastructure/updating/CancelUpdate.cs
@@ -1,4 +1,4 @@
-using momoney.service.contracts.infrastructure.updating;
+using momoney.service.infrastructure.updating;
namespace MoMoney.Service.Infrastructure.Updating
{
product/Service/Infrastructure/Updating/CancelUpdateSpecs.cs → product/service.infrastructure/updating/CancelUpdateSpecs.cs
@@ -1,6 +1,5 @@
using developwithpassion.bdd.contexts;
using Gorilla.Commons.Testing;
-using momoney.service.contracts.infrastructure.updating;
using MoMoney.Service.Infrastructure.Updating;
namespace momoney.service.infrastructure.updating
product/Service/Infrastructure/Updating/CurrentDeployment.cs → product/service.infrastructure/updating/CurrentDeployment.cs
File renamed without changes
product/Service/Infrastructure/Updating/DownloadTheLatestVersion.cs → product/service.infrastructure/updating/DownloadTheLatestVersion.cs
@@ -1,6 +1,6 @@
using gorilla.commons.utility;
using Gorilla.Commons.Utility;
-using momoney.service.contracts.infrastructure.updating;
+using momoney.service.infrastructure.updating;
namespace MoMoney.Service.Infrastructure.Updating
{
product/Service.Contracts/Infrastructure/Updating/ICancelUpdate.cs → product/service.infrastructure/updating/ICancelUpdate.cs
@@ -1,6 +1,6 @@
using gorilla.commons.utility;
-namespace momoney.service.contracts.infrastructure.updating
+namespace momoney.service.infrastructure.updating
{
public interface ICancelUpdate : Command {}
}
\ No newline at end of file
product/Service/Infrastructure/Updating/IDeployment.cs → product/service.infrastructure/updating/IDeployment.cs
File renamed without changes
product/Service.Contracts/Infrastructure/Updating/IDownloadTheLatestVersion.cs → product/service.infrastructure/updating/IDownloadTheLatestVersion.cs
@@ -1,7 +1,7 @@
using gorilla.commons.utility;
using Gorilla.Commons.Utility;
-namespace momoney.service.contracts.infrastructure.updating
+namespace momoney.service.infrastructure.updating
{
public interface IDownloadTheLatestVersion : CallbackCommand<Percent> {}
}
\ No newline at end of file
product/DTO/ApplicationVersion.cs → product/service.infrastructure/updating/IWhatIsTheAvailableVersion.cs
@@ -1,7 +1,10 @@
using System;
+using gorilla.commons.utility;
-namespace MoMoney.DTO
+namespace momoney.service.infrastructure.updating
{
+ public interface IWhatIsTheAvailableVersion : Query<ApplicationVersion> {}
+
public class ApplicationVersion
{
public Uri activation_url { get; set; }
product/Service/Infrastructure/Updating/NullDeployment.cs → product/service.infrastructure/updating/NullDeployment.cs
File renamed without changes
product/Service/Infrastructure/Updating/WhatIsTheAvailableVersion.cs → product/service.infrastructure/updating/WhatIsTheAvailableVersion.cs
@@ -1,5 +1,4 @@
-using MoMoney.DTO;
-using MoMoney.Service.Contracts.Infrastructure.Updating;
+using momoney.service.infrastructure.updating;
namespace MoMoney.Service.Infrastructure.Updating
{
product/Service.Contracts/Infrastructure/IProjectTasks.cs → product/service.infrastructure/IProjectTasks.cs
@@ -1,6 +1,6 @@
using Gorilla.Commons.Infrastructure.FileSystem;
-namespace MoMoney.Service.Contracts.Infrastructure
+namespace momoney.service.infrastructure
{
public interface IProjectTasks
{
product/Service/Infrastructure/ProjectTasks.cs → product/service.infrastructure/ProjectTasks.cs
@@ -1,6 +1,6 @@
using Gorilla.Commons.Infrastructure.FileSystem;
using momoney.database;
-using MoMoney.Service.Contracts.Infrastructure;
+using momoney.service.infrastructure;
namespace MoMoney.Service.Infrastructure
{
product/service.infrastructure/service.infrastructure.csproj
@@ -0,0 +1,158 @@
+<?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>{81412692-F3EE-4FBF-A7C7-69454DD1BD46}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>momoney.service.infrastructure</RootNamespace>
+ <AssemblyName>momoney.service.infrastructure</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="Castle.Core, Version=1.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\castle\Castle.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Castle.DynamicProxy2, Version=2.0.3.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\castle\Castle.DynamicProxy2.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.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.infrastructure.thirdparty, Version=2009.10.21.739, Culture=neutral, PublicKeyToken=687787ccb6c36c9f, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\build\lib\app\gorilla\gorilla.commons.infrastructure.thirdparty.dll</HintPath>
+ </Reference>
+ <Reference Include="gorilla.commons.utility, Version=2009.10.21.739, 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="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.Deployment" />
+ <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="debugging\Launch.cs" />
+ <Compile Include="eventing\EventAggregator.cs" />
+ <Compile Include="eventing\EventAggregatorSpecs.cs" />
+ <Compile Include="eventing\IEvent.cs" />
+ <Compile Include="eventing\IEventAggregator.cs" />
+ <Compile Include="eventing\IEventSubscriber.cs" />
+ <Compile Include="IProjectTasks.cs" />
+ <Compile Include="logging\ILogFileTasks.cs" />
+ <Compile Include="logging\LogFileTasks.cs" />
+ <Compile Include="ProjectTasks.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="security\IsInRole.cs" />
+ <Compile Include="security\IsInRoleSpecs.cs" />
+ <Compile Include="security\Role.cs" />
+ <Compile Include="threading\AsynchronousCommandProcessor.cs" />
+ <Compile Include="threading\BackgroundThread.cs" />
+ <Compile Include="threading\BackgroundThreadFactory.cs" />
+ <Compile Include="threading\BackgroundThreadFactorySpecs.cs" />
+ <Compile Include="threading\BackgroundThreadSpecs.cs" />
+ <Compile Include="threading\CommandProcessor.cs" />
+ <Compile Include="threading\CommandProcessorSpecs.cs" />
+ <Compile Include="threading\ICommandProcessor.cs" />
+ <Compile Include="threading\IntervalTimer.cs" />
+ <Compile Include="threading\IntervalTimerSpecs.cs" />
+ <Compile Include="threading\ITimerClient.cs" />
+ <Compile Include="threading\IWorkerThread.cs" />
+ <Compile Include="threading\RaiseEventInterceptor.cs" />
+ <Compile Include="threading\RunOnBackgroundThreadInterceptor.cs" />
+ <Compile Include="threading\RunOnBackgroundThreadInterceptorSpecs.cs" />
+ <Compile Include="threading\RunOnUIThread.cs" />
+ <Compile Include="threading\SynchronizationContextFactory.cs" />
+ <Compile Include="threading\SynchronizedCommand.cs" />
+ <Compile Include="threading\SynchronizedContext.cs" />
+ <Compile Include="threading\Synchronizer.cs" />
+ <Compile Include="threading\ThreadingExtensions.cs" />
+ <Compile Include="threading\TimerFactory.cs" />
+ <Compile Include="threading\TimerFactorySpecs.cs" />
+ <Compile Include="threading\WorkerThread.cs">
+ <SubType>Component</SubType>
+ </Compile>
+ <Compile Include="threading\WorkItem.cs" />
+ <Compile Include="transactions\EmptyUnitOfWork.cs" />
+ <Compile Include="transactions\IUnitOfWork.cs" />
+ <Compile Include="transactions\IUnitOfWorkFactory.cs" />
+ <Compile Include="transactions\UnitOfWork.cs" />
+ <Compile Include="transactions\UnitOfWorkFactory.cs" />
+ <Compile Include="transactions\UnitOfWorkFactorySpecs.cs" />
+ <Compile Include="transactions\UnitOfWorkSpecs.cs" />
+ <Compile Include="updating\CancelUpdate.cs" />
+ <Compile Include="updating\CancelUpdateSpecs.cs" />
+ <Compile Include="updating\CurrentDeployment.cs" />
+ <Compile Include="updating\DownloadTheLatestVersion.cs" />
+ <Compile Include="updating\ICancelUpdate.cs" />
+ <Compile Include="updating\IDeployment.cs" />
+ <Compile Include="updating\IDownloadTheLatestVersion.cs" />
+ <Compile Include="updating\IWhatIsTheAvailableVersion.cs" />
+ <Compile Include="updating\NullDeployment.cs" />
+ <Compile Include="updating\WhatIsTheAvailableVersion.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\database\database.csproj">
+ <Project>{580E68A8-EDEE-4350-8BBE-A053645B0F83}</Project>
+ <Name>database</Name>
+ </ProjectReference>
+ </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
solution.sln
@@ -3,20 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "build", "build\build.csproj", "{B8505B10-85C7-45F4-B039-D364DD556D7D}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "boot", "product\boot\boot.csproj", "{2DB82691-BF15-4538-8C5E-6BF8F4F875A9}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "boot", "product\Boot\boot.csproj", "{2DB82691-BF15-4538-8C5E-6BF8F4F875A9}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "domain", "product\domain\domain.csproj", "{BE790BCC-4412-473F-9D0A-5AA48FE7A74F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "domain", "product\Domain\domain.csproj", "{BE790BCC-4412-473F-9D0A-5AA48FE7A74F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "service", "product\service\service.csproj", "{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "service", "product\Service\service.csproj", "{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "database", "product\database\database.csproj", "{580E68A8-EDEE-4350-8BBE-A053645B0F83}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dto", "product\dto\dto.csproj", "{ACF52FAB-435B-48C9-A383-C787CB2D8000}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dto", "product\DTO\dto.csproj", "{ACF52FAB-435B-48C9-A383-C787CB2D8000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "presentation", "product\presentation\presentation.csproj", "{D7C83DB3-492D-4514-8C53-C57AD8E7ACE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "service.contracts", "product\service.contracts\service.contracts.csproj", "{41D2B68B-031B-44FF-BAC5-7752D9E29F94}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "service.infrastructure", "product\service.infrastructure\service.infrastructure.csproj", "{81412692-F3EE-4FBF-A7C7-69454DD1BD46}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "domain.services", "product\domain.services\domain.services.csproj", "{F04F922F-C0CC-45FC-BD33-A758BD1B8B36}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -55,6 +59,14 @@ Global
{41D2B68B-031B-44FF-BAC5-7752D9E29F94}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41D2B68B-031B-44FF-BAC5-7752D9E29F94}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41D2B68B-031B-44FF-BAC5-7752D9E29F94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81412692-F3EE-4FBF-A7C7-69454DD1BD46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81412692-F3EE-4FBF-A7C7-69454DD1BD46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81412692-F3EE-4FBF-A7C7-69454DD1BD46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81412692-F3EE-4FBF-A7C7-69454DD1BD46}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F04F922F-C0CC-45FC-BD33-A758BD1B8B36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F04F922F-C0CC-45FC-BD33-A758BD1B8B36}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F04F922F-C0CC-45FC-BD33-A758BD1B8B36}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F04F922F-C0CC-45FC-BD33-A758BD1B8B36}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE