diff options
| author | mo khan <mo@mokhan.ca> | 2009-10-17 21:12:15 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2009-10-17 21:12:15 -0600 |
| commit | 873512af96d6775f3578b734dee65a3e884f9c89 (patch) | |
| tree | d1d89d87dc81900b0d2ebea1c1e74da0c1e0cd92 | |
| parent | a17ce3f5017b5297862b5c8b2f6c4665edfa2618 (diff) | |
updated namespaces.
239 files changed, 911 insertions, 828 deletions
diff --git a/product/Boot/Modules/ApplicationMenuModule.cs b/product/Boot/Modules/ApplicationMenuModule.cs index 21ca375..5ec2d5c 100644 --- a/product/Boot/Modules/ApplicationMenuModule.cs +++ b/product/Boot/Modules/ApplicationMenuModule.cs @@ -1,7 +1,6 @@ using MoMoney.Presentation.Model.Menu; using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Menu; using MoMoney.Service.Infrastructure.Eventing; namespace MoMoney.Modules diff --git a/product/Boot/Modules/ApplicationShellModule.cs b/product/Boot/Modules/ApplicationShellModule.cs index 1c54c7e..9e5745e 100644 --- a/product/Boot/Modules/ApplicationShellModule.cs +++ b/product/Boot/Modules/ApplicationShellModule.cs @@ -1,6 +1,5 @@ using MoMoney.Presentation; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Shell; namespace MoMoney.Modules { diff --git a/product/Boot/Modules/GettingStartedModule.cs b/product/Boot/Modules/GettingStartedModule.cs index fe7d996..7d88da6 100644 --- a/product/Boot/Modules/GettingStartedModule.cs +++ b/product/Boot/Modules/GettingStartedModule.cs @@ -1,7 +1,6 @@ using MoMoney.Presentation; using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Shell; using MoMoney.Service.Infrastructure.Eventing; namespace MoMoney.Modules diff --git a/product/Boot/Modules/NavigationModule.cs b/product/Boot/Modules/NavigationModule.cs index b09b131..9e2c6ba 100644 --- a/product/Boot/Modules/NavigationModule.cs +++ b/product/Boot/Modules/NavigationModule.cs @@ -1,6 +1,5 @@ using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Navigation; using MoMoney.Service.Infrastructure.Eventing; namespace MoMoney.Modules diff --git a/product/Boot/Modules/ToolbarModule.cs b/product/Boot/Modules/ToolbarModule.cs index 443e901..131f413 100644 --- a/product/Boot/Modules/ToolbarModule.cs +++ b/product/Boot/Modules/ToolbarModule.cs @@ -1,7 +1,6 @@ using MoMoney.Presentation.Model.Menu; using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Shell; using MoMoney.Service.Infrastructure.Eventing; namespace MoMoney.Modules diff --git a/product/Boot/Properties/Resources.Designer.cs b/product/Boot/Properties/Resources.Designer.cs index 5b14f3f..ed54e19 100644 --- a/product/Boot/Properties/Resources.Designer.cs +++ b/product/Boot/Properties/Resources.Designer.cs @@ -9,9 +9,6 @@ //------------------------------------------------------------------------------ namespace MoMoney.Properties { - using System; - - /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> @@ -39,7 +36,7 @@ namespace MoMoney.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MoMoney.Properties.Resources", typeof(Resources).Assembly); + var temp = new global::System.Resources.ResourceManager("MoMoney.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/product/Boot/boot/WindowsFormsApplication.cs b/product/Boot/boot/WindowsFormsApplication.cs index 52d30dc..3d888bd 100644 --- a/product/Boot/boot/WindowsFormsApplication.cs +++ b/product/Boot/boot/WindowsFormsApplication.cs @@ -8,14 +8,13 @@ using System.Threading; using System.Windows.Forms; using Gorilla.Commons.Infrastructure.Container; using Gorilla.Commons.Infrastructure.Logging; -using Gorilla.Commons.Infrastructure.Threading; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; using MoMoney.boot.container; using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Presenters; using MoMoney.Service.Infrastructure.Eventing; -using MoMoney.windows.ui; +using MoMoney.Service.Infrastructure.Threading; namespace MoMoney.boot { diff --git a/product/Boot/boot/container/registration/proxy_configuration/NotifyProgressInterceptor.cs b/product/Boot/boot/container/registration/proxy_configuration/NotifyProgressInterceptor.cs index 0764566..0d1a6d8 100644 --- a/product/Boot/boot/container/registration/proxy_configuration/NotifyProgressInterceptor.cs +++ b/product/Boot/boot/container/registration/proxy_configuration/NotifyProgressInterceptor.cs @@ -1,12 +1,11 @@ using Castle.Core.Interceptor; +using Gorilla.Commons.Infrastructure.Logging; using MoMoney.Presentation.Model.messages; using MoMoney.Service.Infrastructure.Eventing; namespace MoMoney.boot.container.registration.proxy_configuration { - public interface INotifyProgressInterceptor : IInterceptor - { - } + public interface INotifyProgressInterceptor : IInterceptor {} public class NotifyProgressInterceptor : INotifyProgressInterceptor { @@ -19,9 +18,13 @@ namespace MoMoney.boot.container.registration.proxy_configuration public void Intercept(IInvocation invocation) { - broker.publish(new StartedRunningCommand(invocation.TargetType.Name)); + this.log().debug("declaring type: {0}", invocation.GetConcreteMethodInvocationTarget().DeclaringType); + this.log().debug("target type: {0}", invocation.TargetType); + this.log().debug("proxy type: {0}", invocation.Proxy); + this.log().debug("invocation target: {0}", invocation.InvocationTarget); + broker.publish(new StartedRunningCommand(invocation.InvocationTarget)); invocation.Proceed(); - broker.publish(new FinishedRunningCommand(invocation.TargetType.Name)); + broker.publish(new FinishedRunningCommand(invocation.InvocationTarget)); } } }
\ No newline at end of file diff --git a/product/Boot/boot/container/registration/proxy_configuration/SynchronizedConfiguration.cs b/product/Boot/boot/container/registration/proxy_configuration/SynchronizedConfiguration.cs index 3bee551..b8f3413 100644 --- a/product/Boot/boot/container/registration/proxy_configuration/SynchronizedConfiguration.cs +++ b/product/Boot/boot/container/registration/proxy_configuration/SynchronizedConfiguration.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Infrastructure.Castle.DynamicProxy; -using Gorilla.Commons.Infrastructure.Castle.DynamicProxy.Interceptors; using Gorilla.Commons.Utility.Core; +using MoMoney.Service.Infrastructure.Threading; namespace MoMoney.boot.container.registration.proxy_configuration { diff --git a/product/Boot/boot/container/registration/proxy_configuration/UnitOfWorkInterceptor.cs b/product/Boot/boot/container/registration/proxy_configuration/UnitOfWorkInterceptor.cs index 407e8d6..e69c28c 100644 --- a/product/Boot/boot/container/registration/proxy_configuration/UnitOfWorkInterceptor.cs +++ b/product/Boot/boot/container/registration/proxy_configuration/UnitOfWorkInterceptor.cs @@ -2,7 +2,6 @@ using Castle.Core.Interceptor; using Gorilla.Commons.Utility.Core; using MoMoney.Service.Contracts.Infrastructure.Transactions; using MoMoney.Service.Infrastructure.Eventing; -using MoMoney.Service.Infrastructure.Transactions; namespace MoMoney.boot.container.registration.proxy_configuration { diff --git a/product/Boot/boot/container/registration/wire_up_the_data_access_components_into_the.cs b/product/Boot/boot/container/registration/wire_up_the_data_access_components_into_the.cs index 3e4a0b5..d1c47b0 100644 --- a/product/Boot/boot/container/registration/wire_up_the_data_access_components_into_the.cs +++ b/product/Boot/boot/container/registration/wire_up_the_data_access_components_into_the.cs @@ -1,7 +1,6 @@ using Gorilla.Commons.Infrastructure; using Gorilla.Commons.Infrastructure.Cloning; using Gorilla.Commons.Infrastructure.Container; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; using MoMoney.boot.container.registration.proxy_configuration; diff --git a/product/Boot/boot/container/registration/wire_up_the_essential_services_into_the.cs b/product/Boot/boot/container/registration/wire_up_the_essential_services_into_the.cs index ce67ca2..93f52b2 100644 --- a/product/Boot/boot/container/registration/wire_up_the_essential_services_into_the.cs +++ b/product/Boot/boot/container/registration/wire_up_the_essential_services_into_the.cs @@ -1,5 +1,4 @@ using Gorilla.Commons.Infrastructure; -using Gorilla.Commons.Infrastructure.Container; using Gorilla.Commons.Infrastructure.Log4Net; using Gorilla.Commons.Infrastructure.Logging; using Gorilla.Commons.Utility.Core; @@ -17,8 +16,8 @@ namespace MoMoney.boot.container.registration public void run() { - registration.singleton<IDependencyRegistration>(() => registration); - registration.singleton<IDependencyRegistry>(() => registration.build()); + registration.singleton(() => registration); + registration.singleton(() => registration.build()); registration.singleton<ILogFactory, Log4NetLogFactory>(); } } diff --git a/product/Boot/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs b/product/Boot/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs index 634b3d0..89d10a2 100644 --- a/product/Boot/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs +++ b/product/Boot/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs @@ -3,15 +3,13 @@ using System.ComponentModel; using System.Deployment.Application; using Gorilla.Commons.Infrastructure; using Gorilla.Commons.Infrastructure.Registries; -using Gorilla.Commons.Infrastructure.Threading; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Core; +using MoMoney.DataAccess.Transactions; using MoMoney.Presentation.Model.Projects; using MoMoney.Presentation.Presenters; using MoMoney.Service.Infrastructure.Eventing; using MoMoney.Service.Infrastructure.Threading; using MoMoney.Service.Infrastructure.Updating; -using MoMoney.Tasks.infrastructure.updating; namespace MoMoney.boot.container.registration { diff --git a/product/Boot/boot/container/registration/wire_up_the_presentation_modules.cs b/product/Boot/boot/container/registration/wire_up_the_presentation_modules.cs index a63dcea..54495b0 100644 --- a/product/Boot/boot/container/registration/wire_up_the_presentation_modules.cs +++ b/product/Boot/boot/container/registration/wire_up_the_presentation_modules.cs @@ -1,21 +1,17 @@ using System; -using System.Collections.Generic; using System.Reflection; using Gorilla.Commons.Infrastructure; using Gorilla.Commons.Infrastructure.Reflection; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; using MoMoney.boot.container.registration.proxy_configuration; -using MoMoney.DTO; using MoMoney.Presentation; using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.Menu.File; using MoMoney.Presentation.Model.Menu.Help; using MoMoney.Presentation.Model.Menu.window; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Commands; using MoMoney.Presentation.Views; -using MoMoney.Service.Contracts.Application; namespace MoMoney.boot.container.registration { diff --git a/product/Boot/boot/container/registration/wire_up_the_views_in_to_the.cs b/product/Boot/boot/container/registration/wire_up_the_views_in_to_the.cs index 6247ec3..7bcd09a 100644 --- a/product/Boot/boot/container/registration/wire_up_the_views_in_to_the.cs +++ b/product/Boot/boot/container/registration/wire_up_the_views_in_to_the.cs @@ -3,13 +3,6 @@ using System.Windows.Forms; using Gorilla.Commons.Infrastructure; using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.billing; -using MoMoney.Presentation.Views.dialogs; -using MoMoney.Presentation.Views.Menu; -using MoMoney.Presentation.Views.Navigation; -using MoMoney.Presentation.Views.Shell; -using MoMoney.Presentation.Views.Startup; -using MoMoney.Presentation.Views.updates; using MoMoney.Presentation.Winforms.Views; namespace MoMoney.boot.container.registration diff --git a/product/Boot/boot/hookup.cs b/product/Boot/boot/hookup.cs index edc51d8..06f9d0f 100644 --- a/product/Boot/boot/hookup.cs +++ b/product/Boot/boot/hookup.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Utility.Core; -namespace MoMoney.windows.ui +namespace MoMoney.boot { class hookup { diff --git a/product/Boot/boot/start_the_application.cs b/product/Boot/boot/start_the_application.cs index 3ae510e..e6f5985 100644 --- a/product/Boot/boot/start_the_application.cs +++ b/product/Boot/boot/start_the_application.cs @@ -1,5 +1,4 @@ using Gorilla.Commons.Infrastructure; -using Gorilla.Commons.Infrastructure.Threading; using Gorilla.Commons.Utility.Core; using MoMoney.Modules.Core; using MoMoney.Service.Infrastructure.Threading; diff --git a/product/DataAccess/Db40/ConnectionFactory.cs b/product/DataAccess/Db40/ConnectionFactory.cs index 30c4824..8fec941 100644 --- a/product/DataAccess/Db40/ConnectionFactory.cs +++ b/product/DataAccess/Db40/ConnectionFactory.cs @@ -1,8 +1,8 @@ using Db4objects.Db4o; using Db4objects.Db4o.Config; using Gorilla.Commons.Infrastructure.FileSystem; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Extensions; +using MoMoney.DataAccess.Transactions; namespace MoMoney.DataAccess.Db40 { diff --git a/product/DataAccess/Db40/DatabaseConnection.cs b/product/DataAccess/Db40/DatabaseConnection.cs index c3b6d43..585ba8c 100644 --- a/product/DataAccess/Db40/DatabaseConnection.cs +++ b/product/DataAccess/Db40/DatabaseConnection.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using Db4objects.Db4o; -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; namespace MoMoney.DataAccess.Db40 { diff --git a/product/DataAccess/IConnectionFactory.cs b/product/DataAccess/IConnectionFactory.cs index 3c996fe..78a38a0 100644 --- a/product/DataAccess/IConnectionFactory.cs +++ b/product/DataAccess/IConnectionFactory.cs @@ -1,5 +1,5 @@ using Gorilla.Commons.Infrastructure.FileSystem; -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; namespace MoMoney.DataAccess { diff --git a/product/DataAccess/ObjectDatabase.cs b/product/DataAccess/ObjectDatabase.cs index 4ef317b..1613ce1 100644 --- a/product/DataAccess/ObjectDatabase.cs +++ b/product/DataAccess/ObjectDatabase.cs @@ -3,8 +3,8 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Gorilla.Commons.Infrastructure.FileSystem; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Core; +using MoMoney.DataAccess.Transactions; namespace MoMoney.DataAccess { diff --git a/product/DataAccess/Repositories/AccountHolderRepository.cs b/product/DataAccess/Repositories/AccountHolderRepository.cs index 7504789..4be490c 100644 --- a/product/DataAccess/Repositories/AccountHolderRepository.cs +++ b/product/DataAccess/Repositories/AccountHolderRepository.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; using MoMoney.Domain.accounting; using MoMoney.Domain.repositories; diff --git a/product/DataAccess/Repositories/BillRepository.cs b/product/DataAccess/Repositories/BillRepository.cs index dd3c406..ef28c7d 100644 --- a/product/DataAccess/Repositories/BillRepository.cs +++ b/product/DataAccess/Repositories/BillRepository.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; using MoMoney.Domain.Accounting; using MoMoney.Domain.repositories; diff --git a/product/DataAccess/Repositories/CompanyRepository.cs b/product/DataAccess/Repositories/CompanyRepository.cs index 9b1a8d8..e8d319f 100644 --- a/product/DataAccess/Repositories/CompanyRepository.cs +++ b/product/DataAccess/Repositories/CompanyRepository.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; using System.Linq; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Extensions; +using MoMoney.DataAccess.Transactions; using MoMoney.Domain.Accounting; using MoMoney.Domain.repositories; diff --git a/product/DataAccess/Repositories/IncomeRepository.cs b/product/DataAccess/Repositories/IncomeRepository.cs index 143c88a..c79b16d 100644 --- a/product/DataAccess/Repositories/IncomeRepository.cs +++ b/product/DataAccess/Repositories/IncomeRepository.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; using MoMoney.Domain.Accounting; using MoMoney.Domain.repositories; diff --git a/product/DataAccess/Transactions/ChangeTracker.cs b/product/DataAccess/Transactions/ChangeTracker.cs index 4fd5905..1700955 100644 --- a/product/DataAccess/Transactions/ChangeTracker.cs +++ b/product/DataAccess/Transactions/ChangeTracker.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; diff --git a/product/DataAccess/Transactions/ChangeTrackerFactory.cs b/product/DataAccess/Transactions/ChangeTrackerFactory.cs index df2a3cc..15afe7d 100644 --- a/product/DataAccess/Transactions/ChangeTrackerFactory.cs +++ b/product/DataAccess/Transactions/ChangeTrackerFactory.cs @@ -1,6 +1,5 @@ using System; using Gorilla.Commons.Infrastructure.Container; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Utility.Core; namespace MoMoney.DataAccess.Transactions diff --git a/product/DataAccess/Transactions/ChangeTrackerFactorySpecs.cs b/product/DataAccess/Transactions/ChangeTrackerFactorySpecs.cs index 58bc25b..7e9a71f 100644 --- a/product/DataAccess/Transactions/ChangeTrackerFactorySpecs.cs +++ b/product/DataAccess/Transactions/ChangeTrackerFactorySpecs.cs @@ -1,6 +1,5 @@ using System; using developwithpassion.bdd.contexts; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; diff --git a/product/DataAccess/Transactions/ChangeTrackerSpecs.cs b/product/DataAccess/Transactions/ChangeTrackerSpecs.cs index 63db943..39a71c8 100644 --- a/product/DataAccess/Transactions/ChangeTrackerSpecs.cs +++ b/product/DataAccess/Transactions/ChangeTrackerSpecs.cs @@ -1,6 +1,5 @@ using System; using developwithpassion.bdd.contexts; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; diff --git a/product/DataAccess/Transactions/Context.cs b/product/DataAccess/Transactions/Context.cs index ee2ebe7..6170c32 100644 --- a/product/DataAccess/Transactions/Context.cs +++ b/product/DataAccess/Transactions/Context.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class Context : IContext { diff --git a/product/DataAccess/Transactions/ContextFactory.cs b/product/DataAccess/Transactions/ContextFactory.cs index 6ece11a..57f31aa 100644 --- a/product/DataAccess/Transactions/ContextFactory.cs +++ b/product/DataAccess/Transactions/ContextFactory.cs @@ -1,4 +1,4 @@ -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IContextFactory { diff --git a/product/DataAccess/Transactions/ContextFactorySpecs.cs b/product/DataAccess/Transactions/ContextFactorySpecs.cs index 5a99a02..63a5acc 100644 --- a/product/DataAccess/Transactions/ContextFactorySpecs.cs +++ b/product/DataAccess/Transactions/ContextFactorySpecs.cs @@ -2,30 +2,32 @@ using System.Collections; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class ContextFactorySpecs { - } - - [Concern(typeof (ContextFactory))] - public class when_creating_a_new_context : concerns_for<IContextFactory, ContextFactory> - { - context c = () => - { - scope = an<IScopedStorage>(); - storage = an<IDictionary>(); + [Concern(typeof (ContextFactory))] + public class when_creating_a_new_context : concerns_for<IContextFactory, ContextFactory> + { + context c = () => + { + scope = an<IScopedStorage>(); + storage = an<IDictionary>(); - when_the(scope).is_told_to(x => x.provide_storage()).it_will_return(storage); - }; + when_the(scope).is_told_to(x => x.provide_storage()).it_will_return(storage); + }; - because b = () => { result = sut.create_for(scope); }; + because b = () => + { + result = sut.create_for(scope); + }; - it should_return_a_context_that_represents_the_specified_scope = - () => result.should_be_an_instance_of<Context>(); + it should_return_a_context_that_represents_the_specified_scope = + () => result.should_be_an_instance_of<Context>(); - static IDictionary storage; - static IScopedStorage scope; - static IContext result; + static IDictionary storage; + static IScopedStorage scope; + static IContext result; + } } }
\ No newline at end of file diff --git a/product/DataAccess/Transactions/CurrentThread.cs b/product/DataAccess/Transactions/CurrentThread.cs index e48d701..d7764a3 100644 --- a/product/DataAccess/Transactions/CurrentThread.cs +++ b/product/DataAccess/Transactions/CurrentThread.cs @@ -1,6 +1,6 @@ using System.Threading; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class CurrentThread : IThread { diff --git a/product/DataAccess/Transactions/IChangeTracker.cs b/product/DataAccess/Transactions/IChangeTracker.cs index d4c904f..adb632a 100644 --- a/product/DataAccess/Transactions/IChangeTracker.cs +++ b/product/DataAccess/Transactions/IChangeTracker.cs @@ -1,7 +1,7 @@ using System; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IChangeTracker : IDisposable { diff --git a/product/DataAccess/Transactions/IChangeTrackerFactory.cs b/product/DataAccess/Transactions/IChangeTrackerFactory.cs index 29c0a3c..2117cbe 100644 --- a/product/DataAccess/Transactions/IChangeTrackerFactory.cs +++ b/product/DataAccess/Transactions/IChangeTrackerFactory.cs @@ -1,7 +1,7 @@ using System; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IChangeTrackerFactory { diff --git a/product/DataAccess/Transactions/IContext.cs b/product/DataAccess/Transactions/IContext.cs index 9e3c7d4..402dd99 100644 --- a/product/DataAccess/Transactions/IContext.cs +++ b/product/DataAccess/Transactions/IContext.cs @@ -1,4 +1,4 @@ -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IContext { diff --git a/product/DataAccess/Transactions/IDatabase.cs b/product/DataAccess/Transactions/IDatabase.cs index 19bd3c9..6d5b40e 100644 --- a/product/DataAccess/Transactions/IDatabase.cs +++ b/product/DataAccess/Transactions/IDatabase.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IDatabase { diff --git a/product/DataAccess/Transactions/IDatabaseConnection.cs b/product/DataAccess/Transactions/IDatabaseConnection.cs index d7be236..1b7ca44 100644 --- a/product/DataAccess/Transactions/IDatabaseConnection.cs +++ b/product/DataAccess/Transactions/IDatabaseConnection.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IDatabaseConnection : IDisposable { diff --git a/product/DataAccess/Transactions/IIdentityMap.cs b/product/DataAccess/Transactions/IIdentityMap.cs index 400803f..3d710c1 100644 --- a/product/DataAccess/Transactions/IIdentityMap.cs +++ b/product/DataAccess/Transactions/IIdentityMap.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IIdentityMap<TKey, TValue> { diff --git a/product/DataAccess/Transactions/IKey.cs b/product/DataAccess/Transactions/IKey.cs index 8c1a1b1..070d057 100644 --- a/product/DataAccess/Transactions/IKey.cs +++ b/product/DataAccess/Transactions/IKey.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IKey<T> { diff --git a/product/DataAccess/Transactions/IScopedStorage.cs b/product/DataAccess/Transactions/IScopedStorage.cs index ab6a970..73b9b06 100644 --- a/product/DataAccess/Transactions/IScopedStorage.cs +++ b/product/DataAccess/Transactions/IScopedStorage.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IScopedStorage { diff --git a/product/DataAccess/Transactions/IStatement.cs b/product/DataAccess/Transactions/IStatement.cs index fa48472..7460480 100644 --- a/product/DataAccess/Transactions/IStatement.cs +++ b/product/DataAccess/Transactions/IStatement.cs @@ -1,4 +1,4 @@ -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IStatement { diff --git a/product/DataAccess/Transactions/IStatementRegistry.cs b/product/DataAccess/Transactions/IStatementRegistry.cs index 9073a2d..688f22d 100644 --- a/product/DataAccess/Transactions/IStatementRegistry.cs +++ b/product/DataAccess/Transactions/IStatementRegistry.cs @@ -1,7 +1,7 @@ using System; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IStatementRegistry { diff --git a/product/DataAccess/Transactions/IThread.cs b/product/DataAccess/Transactions/IThread.cs index 8c45cbb..bc5a19f 100644 --- a/product/DataAccess/Transactions/IThread.cs +++ b/product/DataAccess/Transactions/IThread.cs @@ -1,4 +1,4 @@ -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface IThread { diff --git a/product/DataAccess/Transactions/IdentityMapProxy.cs b/product/DataAccess/Transactions/IdentityMapProxy.cs index 76a3b78..5f06c8f 100644 --- a/product/DataAccess/Transactions/IdentityMapProxy.cs +++ b/product/DataAccess/Transactions/IdentityMapProxy.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class IdentityMapProxy<Key, Value> : IIdentityMap<Key, Value> where Value : IIdentifiable<Guid> { diff --git a/product/DataAccess/Transactions/IdentityMapSpecs.cs b/product/DataAccess/Transactions/IdentityMapSpecs.cs index 53126eb..089a47d 100644 --- a/product/DataAccess/Transactions/IdentityMapSpecs.cs +++ b/product/DataAccess/Transactions/IdentityMapSpecs.cs @@ -1,7 +1,7 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { [Concern(typeof (IdentityMap<,>))] public class behaves_like_identity_map : concerns_for<IIdentityMap<int, string>, IdentityMap<int, string>> @@ -18,10 +18,10 @@ namespace Gorilla.Commons.Infrastructure.Transactions it should_return_the_item_that_was_added_for_the_given_key = () => result.should_be_equal_to("1"); because b = () => - { - sut.add(1, "1"); - result = sut.item_that_belongs_to(1); - }; + { + sut.add(1, "1"); + result = sut.item_that_belongs_to(1); + }; static string result; } @@ -43,10 +43,10 @@ namespace Gorilla.Commons.Infrastructure.Transactions it should_return_true = () => result.should_be_true(); because b = () => - { - sut.add(10, "10"); - result = sut.contains_an_item_for(10); - }; + { + sut.add(10, "10"); + result = sut.contains_an_item_for(10); + }; static bool result; } @@ -69,11 +69,11 @@ namespace Gorilla.Commons.Infrastructure.Transactions it should_replace_the_old_item_with_the_new_one = () => result.should_be_equal_to("7"); because b = () => - { - sut.add(6, "6"); - sut.update_the_item_for(6, "7"); - result = sut.item_that_belongs_to(6); - }; + { + sut.add(6, "6"); + sut.update_the_item_for(6, "7"); + result = sut.item_that_belongs_to(6); + }; static string result; } @@ -85,10 +85,10 @@ namespace Gorilla.Commons.Infrastructure.Transactions it should_add_the_new_item = () => result.should_be_equal_to("3"); because b = () => - { - sut.update_the_item_for(3, "3"); - result = sut.item_that_belongs_to(3); - }; + { + sut.update_the_item_for(3, "3"); + result = sut.item_that_belongs_to(3); + }; static string result; } diff --git a/product/DataAccess/Transactions/PerThread.cs b/product/DataAccess/Transactions/PerThread.cs index ccc2520..17714a1 100644 --- a/product/DataAccess/Transactions/PerThread.cs +++ b/product/DataAccess/Transactions/PerThread.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Threading; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class PerThread : IContext { @@ -39,14 +39,14 @@ namespace Gorilla.Commons.Infrastructure.Transactions { var id = Thread.CurrentThread.ManagedThreadId; within_lock(() => - { - if (!slots.ContainsKey(id)) - { - var slot = Thread.GetNamedDataSlot(GetType().FullName); - slots.Add(id, slot); - Thread.SetData(slot, new Hashtable()); - } - }); + { + if (!slots.ContainsKey(id)) + { + var slot = Thread.GetNamedDataSlot(GetType().FullName); + slots.Add(id, slot); + Thread.SetData(slot, new Hashtable()); + } + }); return (IDictionary) Thread.GetData(slots[id]); } diff --git a/product/DataAccess/Transactions/PerThreadScopedStorage.cs b/product/DataAccess/Transactions/PerThreadScopedStorage.cs index ea97c85..4b64e5a 100644 --- a/product/DataAccess/Transactions/PerThreadScopedStorage.cs +++ b/product/DataAccess/Transactions/PerThreadScopedStorage.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class PerThreadScopedStorage : IScopedStorage { diff --git a/product/DataAccess/Transactions/PerThreadScopedStorageSpecs.cs b/product/DataAccess/Transactions/PerThreadScopedStorageSpecs.cs index e722add..80334b9 100644 --- a/product/DataAccess/Transactions/PerThreadScopedStorageSpecs.cs +++ b/product/DataAccess/Transactions/PerThreadScopedStorageSpecs.cs @@ -1,27 +1,24 @@ -using System; using System.Collections; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class PerThreadScopedStorageSpecs { - } [Concern(typeof (PerThreadScopedStorage))] public class when_retrieving_the_storage_for_a_specific_thread : concerns_for<IScopedStorage, PerThreadScopedStorage> { context c = () => - { - thread_id = DateTime.Now.Ticks; - thread = the_dependency<IThread>(); - storage = new Hashtable(); - when_the(thread) - .is_told_to(x => x.provide_slot_for<Hashtable>()) - .it_will_return(storage); - }; + { + thread = the_dependency<IThread>(); + storage = new Hashtable(); + when_the(thread) + .is_told_to(x => x.provide_slot_for<Hashtable>()) + .it_will_return(storage); + }; because b = () => { result = sut.provide_storage(); }; @@ -29,7 +26,7 @@ namespace Gorilla.Commons.Infrastructure.Transactions static IDictionary result; static IThread thread; - static long thread_id; static Hashtable storage; } + } }
\ No newline at end of file diff --git a/product/DataAccess/Transactions/Session.cs b/product/DataAccess/Transactions/Session.cs index 39a7dff..d355a2e 100644 --- a/product/DataAccess/Transactions/Session.cs +++ b/product/DataAccess/Transactions/Session.cs @@ -5,7 +5,7 @@ using Gorilla.Commons.Infrastructure.Logging; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface ISession : IDisposable { diff --git a/product/DataAccess/Transactions/SessionFactory.cs b/product/DataAccess/Transactions/SessionFactory.cs index f305968..f5a8b64 100644 --- a/product/DataAccess/Transactions/SessionFactory.cs +++ b/product/DataAccess/Transactions/SessionFactory.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface ISessionFactory : IFactory<ISession> { diff --git a/product/DataAccess/Transactions/SessionFactorySpecs.cs b/product/DataAccess/Transactions/SessionFactorySpecs.cs index 0e0a93d..959aaf1 100644 --- a/product/DataAccess/Transactions/SessionFactorySpecs.cs +++ b/product/DataAccess/Transactions/SessionFactorySpecs.cs @@ -1,7 +1,7 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class SessionFactorySpecs { diff --git a/product/DataAccess/Transactions/SessionNotStartedException.cs b/product/DataAccess/Transactions/SessionNotStartedException.cs index 686018f..7004b47 100644 --- a/product/DataAccess/Transactions/SessionNotStartedException.cs +++ b/product/DataAccess/Transactions/SessionNotStartedException.cs @@ -1,6 +1,6 @@ using System; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class SessionNotStartedException : Exception { diff --git a/product/DataAccess/Transactions/SessionProvider.cs b/product/DataAccess/Transactions/SessionProvider.cs index 8f5a7ab..cbf37d5 100644 --- a/product/DataAccess/Transactions/SessionProvider.cs +++ b/product/DataAccess/Transactions/SessionProvider.cs @@ -1,4 +1,4 @@ -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface ISessionProvider { diff --git a/product/DataAccess/Transactions/SessionSpecs.cs b/product/DataAccess/Transactions/SessionSpecs.cs index e81a1d4..79f802a 100644 --- a/product/DataAccess/Transactions/SessionSpecs.cs +++ b/product/DataAccess/Transactions/SessionSpecs.cs @@ -4,175 +4,178 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class SessionSpecs { - } - - public class behaves_like_session : concerns_for<ISession, Session> - { - context c = () => - { - transaction = the_dependency<ITransaction>(); - database = the_dependency<IDatabase>(); - }; - - static protected ITransaction transaction; - static protected IDatabase database; - } - - [Concern(typeof (Session))] - public class when_saving_a_transient_item_to_a_session : behaves_like_session - { - it should_add_the_entity_to_the_identity_map = () => map.was_told_to(x => x.add(guid, entity)); - - context c = () => - { - guid = Guid.NewGuid(); - entity = an<ITestEntity>(); - map = an<IIdentityMap<Guid, ITestEntity>>(); - - when_the(entity).is_told_to(x => x.id).it_will_return(guid); - when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()).it_will_return(map); - }; - - because b = () => sut.save(entity); - - static ITestEntity entity; - static IIdentityMap<Guid, ITestEntity> map; - static Id<Guid> guid; - } - - [Concern(typeof (Session))] - public class when_commiting_the_changes_made_in_a_session : behaves_like_session - { - it should_commit_all_the_changes_from_the_running_transaction = - () => transaction.was_told_to(x => x.commit_changes()); - - it should_not_rollback_any_changes_from_the_running_transaction = - () => transaction.was_not_told_to(x => x.rollback_changes()); - - because b = () => - { - sut.flush(); - sut.Dispose(); - }; - } - - [Concern(typeof (Session))] - public class when_closing_a_session_before_flushing_the_changes : behaves_like_session - { - it should_rollback_any_changes_made_in_the_current_transaction = - () => transaction.was_told_to(x => x.rollback_changes()); - - because b = () => sut.Dispose(); - } - - [Concern(typeof (Session))] - public class when_loading_all_instances_of_a_certain_type_and_some_have_already_been_loaded : behaves_like_session - { - it should_return_the_items_from_the_cache = () => results.should_contain(cached_item); - - it should_exclude_duplicates_from_the_database = () => results.should_not_contain(database_item); - - it should_add_items_from_the_database_to_the_identity_map = - () => identity_map.was_told_to(x => x.add(id_of_the_uncached_item, uncached_item)); - - context c = () => - { - id = Guid.NewGuid(); - id_of_the_uncached_item = Guid.NewGuid(); - identity_map = an<IIdentityMap<Guid, ITestEntity>>(); - cached_item = an<ITestEntity>(); - database_item = an<ITestEntity>(); - uncached_item = an<ITestEntity>(); - - when_the(cached_item).is_told_to(x => x.id).it_will_return(id); - when_the(database_item).is_told_to(x => x.id).it_will_return(id); - when_the(uncached_item).is_told_to(x => x.id).it_will_return(id_of_the_uncached_item); - when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()).it_will_return( identity_map); - when_the(identity_map).is_told_to(x => x.contains_an_item_for(id)).it_will_return(true); - when_the(identity_map).is_told_to(x => x.all()).it_will_return(cached_item); - when_the(database).is_told_to(x => x.fetch_all<ITestEntity>()) - .it_will_return(database_item, uncached_item); - }; - - because b = () => - { - sut.find<ITestEntity>(id); - results = sut.all<ITestEntity>(); - }; - - static IEnumerable<ITestEntity> results; - static Id<Guid> id; - static Id<Guid> id_of_the_uncached_item; - static ITestEntity cached_item; - static ITestEntity database_item; - static IIdentityMap<Guid, ITestEntity> identity_map; - static ITestEntity uncached_item; - } - - [Concern(typeof (Session))] - public class when_looking_up_a_specific_entity_by_its_id_and_it_has_not_been_loaded_into_the_cache : - behaves_like_session - { - it should_return_that_item = () => { result.should_be_equal_to(correct_item); }; - - it should_add_that_item_to_the_identity_map = () => map.was_told_to(x => x.add(id, correct_item)); - - context c = () => - { - id = Guid.NewGuid(); - wrong_item = an<ITestEntity>(); - correct_item = an<ITestEntity>(); - map = an<IIdentityMap<Guid, ITestEntity>>(); - when_the(wrong_item).is_told_to(x => x.id).it_will_return<Id<Guid>>(Guid.NewGuid()); - when_the(correct_item).is_told_to(x => x.id).it_will_return(id); - when_the(database) - .is_told_to(x => x.fetch_all<ITestEntity>()) - .it_will_return(wrong_item, correct_item); - when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()) - .it_will_return(map); - }; - - because b = () => { result = sut.find<ITestEntity>(id); }; - - static Id<Guid> id; - static IIdentifiable<Guid> result; - static ITestEntity correct_item; - static ITestEntity wrong_item; - static IIdentityMap<Guid, ITestEntity> map; - } - - [Concern(typeof (Session))] - public class when_deleting_an_item_from_the_database : behaves_like_session - { - it should_remove_that_item_from_the_cache = () => map.was_told_to(x => x.evict(id)); - - context c = () => - { - id = Guid.NewGuid(); - entity = an<ITestEntity>(); - map = an<IIdentityMap<Guid, ITestEntity>>(); - - when_the(entity).is_told_to(x => x.id).it_will_return(id); - when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()).it_will_return(map); - when_the(database).is_told_to(x => x.fetch_all<ITestEntity>()).it_will_return(entity); - }; - - because b = () => - { - sut.find<ITestEntity>(id); - sut.delete(entity); - }; - - static Id<Guid> id; - static IIdentityMap<Guid, ITestEntity> map; - static ITestEntity entity; - } - - public interface ITestEntity : IIdentifiable<Guid> - { + public class behaves_like_session : concerns_for<ISession, Session> + { + context c = () => + { + transaction = the_dependency<ITransaction>(); + database = the_dependency<IDatabase>(); + }; + + static protected ITransaction transaction; + static protected IDatabase database; + } + + [Concern(typeof (Session))] + public class when_saving_a_transient_item_to_a_session : behaves_like_session + { + it should_add_the_entity_to_the_identity_map = () => map.was_told_to(x => x.add(guid, entity)); + + context c = () => + { + guid = Guid.NewGuid(); + entity = an<ITestEntity>(); + map = an<IIdentityMap<Guid, ITestEntity>>(); + + when_the(entity).is_told_to(x => x.id).it_will_return(guid); + when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()).it_will_return(map); + }; + + because b = () => sut.save(entity); + + static ITestEntity entity; + static IIdentityMap<Guid, ITestEntity> map; + static Id<Guid> guid; + } + + [Concern(typeof (Session))] + public class when_commiting_the_changes_made_in_a_session : behaves_like_session + { + it should_commit_all_the_changes_from_the_running_transaction = + () => transaction.was_told_to(x => x.commit_changes()); + + it should_not_rollback_any_changes_from_the_running_transaction = + () => transaction.was_not_told_to(x => x.rollback_changes()); + + because b = () => + { + sut.flush(); + sut.Dispose(); + }; + } + + [Concern(typeof (Session))] + public class when_closing_a_session_before_flushing_the_changes : behaves_like_session + { + it should_rollback_any_changes_made_in_the_current_transaction = + () => transaction.was_told_to(x => x.rollback_changes()); + + because b = () => sut.Dispose(); + } + + [Concern(typeof (Session))] + public class when_loading_all_instances_of_a_certain_type_and_some_have_already_been_loaded : behaves_like_session + { + it should_return_the_items_from_the_cache = () => results.should_contain(cached_item); + + it should_exclude_duplicates_from_the_database = () => results.should_not_contain(database_item); + + it should_add_items_from_the_database_to_the_identity_map = + () => identity_map.was_told_to(x => x.add(id_of_the_uncached_item, uncached_item)); + + context c = () => + { + id = Guid.NewGuid(); + id_of_the_uncached_item = Guid.NewGuid(); + identity_map = an<IIdentityMap<Guid, ITestEntity>>(); + cached_item = an<ITestEntity>(); + database_item = an<ITestEntity>(); + uncached_item = an<ITestEntity>(); + + when_the(cached_item).is_told_to(x => x.id).it_will_return(id); + when_the(database_item).is_told_to(x => x.id).it_will_return(id); + when_the(uncached_item).is_told_to(x => x.id).it_will_return(id_of_the_uncached_item); + when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()).it_will_return(identity_map); + when_the(identity_map).is_told_to(x => x.contains_an_item_for(id)).it_will_return(true); + when_the(identity_map).is_told_to(x => x.all()).it_will_return(cached_item); + when_the(database).is_told_to(x => x.fetch_all<ITestEntity>()) + .it_will_return(database_item, uncached_item); + }; + + because b = () => + { + sut.find<ITestEntity>(id); + results = sut.all<ITestEntity>(); + }; + + static IEnumerable<ITestEntity> results; + static Id<Guid> id; + static Id<Guid> id_of_the_uncached_item; + static ITestEntity cached_item; + static ITestEntity database_item; + static IIdentityMap<Guid, ITestEntity> identity_map; + static ITestEntity uncached_item; + } + + [Concern(typeof (Session))] + public class when_looking_up_a_specific_entity_by_its_id_and_it_has_not_been_loaded_into_the_cache : + behaves_like_session + { + it should_return_that_item = () => + { + result.should_be_equal_to(correct_item); + }; + + it should_add_that_item_to_the_identity_map = () => map.was_told_to(x => x.add(id, correct_item)); + + context c = () => + { + id = Guid.NewGuid(); + wrong_item = an<ITestEntity>(); + correct_item = an<ITestEntity>(); + map = an<IIdentityMap<Guid, ITestEntity>>(); + when_the(wrong_item).is_told_to(x => x.id).it_will_return<Id<Guid>>(Guid.NewGuid()); + when_the(correct_item).is_told_to(x => x.id).it_will_return(id); + when_the(database) + .is_told_to(x => x.fetch_all<ITestEntity>()) + .it_will_return(wrong_item, correct_item); + when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()) + .it_will_return(map); + }; + + because b = () => + { + result = sut.find<ITestEntity>(id); + }; + + static Id<Guid> id; + static IIdentifiable<Guid> result; + static ITestEntity correct_item; + static ITestEntity wrong_item; + static IIdentityMap<Guid, ITestEntity> map; + } + + [Concern(typeof (Session))] + public class when_deleting_an_item_from_the_database : behaves_like_session + { + it should_remove_that_item_from_the_cache = () => map.was_told_to(x => x.evict(id)); + + context c = () => + { + id = Guid.NewGuid(); + entity = an<ITestEntity>(); + map = an<IIdentityMap<Guid, ITestEntity>>(); + + when_the(entity).is_told_to(x => x.id).it_will_return(id); + when_the(transaction).is_told_to(x => x.create_for<ITestEntity>()).it_will_return(map); + when_the(database).is_told_to(x => x.fetch_all<ITestEntity>()).it_will_return(entity); + }; + + because b = () => + { + sut.find<ITestEntity>(id); + sut.delete(entity); + }; + + static Id<Guid> id; + static IIdentityMap<Guid, ITestEntity> map; + static ITestEntity entity; + } + + public interface ITestEntity : IIdentifiable<Guid> {} } }
\ No newline at end of file diff --git a/product/DataAccess/Transactions/SingletonScopedStorage.cs b/product/DataAccess/Transactions/SingletonScopedStorage.cs index 2de16aa..e6a675f 100644 --- a/product/DataAccess/Transactions/SingletonScopedStorage.cs +++ b/product/DataAccess/Transactions/SingletonScopedStorage.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class SingletonScopedStorage : IScopedStorage { diff --git a/product/DataAccess/Transactions/StatementRegistry.cs b/product/DataAccess/Transactions/StatementRegistry.cs index 7d6a770..392b69b 100644 --- a/product/DataAccess/Transactions/StatementRegistry.cs +++ b/product/DataAccess/Transactions/StatementRegistry.cs @@ -1,7 +1,7 @@ using System; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class StatementRegistry : IStatementRegistry { diff --git a/product/DataAccess/Transactions/TrackerEntry.cs b/product/DataAccess/Transactions/TrackerEntry.cs index 35f673e..6322996 100644 --- a/product/DataAccess/Transactions/TrackerEntry.cs +++ b/product/DataAccess/Transactions/TrackerEntry.cs @@ -1,7 +1,7 @@ using System.Reflection; using Gorilla.Commons.Infrastructure.Logging; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface ITrackerEntry<T> { diff --git a/product/DataAccess/Transactions/TrackerEntryMapper.cs b/product/DataAccess/Transactions/TrackerEntryMapper.cs index c01ce67..2d04b9b 100644 --- a/product/DataAccess/Transactions/TrackerEntryMapper.cs +++ b/product/DataAccess/Transactions/TrackerEntryMapper.cs @@ -1,7 +1,7 @@ using Gorilla.Commons.Infrastructure.Cloning; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface ITrackerEntryMapper<T> : IMapper<T, ITrackerEntry<T>> { diff --git a/product/DataAccess/Transactions/TrackerEntrySpecs.cs b/product/DataAccess/Transactions/TrackerEntrySpecs.cs index c1c1309..1c7c632 100644 --- a/product/DataAccess/Transactions/TrackerEntrySpecs.cs +++ b/product/DataAccess/Transactions/TrackerEntrySpecs.cs @@ -4,7 +4,7 @@ using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class TrackerEntrySpecs { @@ -55,11 +55,11 @@ namespace Gorilla.Commons.Infrastructure.Transactions because b = () => { result = sut.has_changes(); }; context c = () => - { - var id = Guid.NewGuid(); - original = new Pillow("green", id); - current = new Pillow(null, id); - }; + { + var id = Guid.NewGuid(); + original = new Pillow("green", id); + current = new Pillow(null, id); + }; public override ITrackerEntry<Pillow> create_sut() { @@ -80,11 +80,11 @@ namespace Gorilla.Commons.Infrastructure.Transactions because b = () => { result = sut.has_changes(); }; context c = () => - { - var id = Guid.NewGuid(); - original = new Pillow("green", id); - current = new Pillow("green", id); - }; + { + var id = Guid.NewGuid(); + original = new Pillow("green", id); + current = new Pillow("green", id); + }; public override ITrackerEntry<Pillow> create_sut() { diff --git a/product/DataAccess/Transactions/Transaction.cs b/product/DataAccess/Transactions/Transaction.cs index 4dd455c..52bbe88 100644 --- a/product/DataAccess/Transactions/Transaction.cs +++ b/product/DataAccess/Transactions/Transaction.cs @@ -4,7 +4,7 @@ using System.Linq; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public interface ITransaction { diff --git a/product/DataAccess/Transactions/TransactionSpecs.cs b/product/DataAccess/Transactions/TransactionSpecs.cs index b3c8b4d..a804d03 100644 --- a/product/DataAccess/Transactions/TransactionSpecs.cs +++ b/product/DataAccess/Transactions/TransactionSpecs.cs @@ -3,7 +3,7 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class TransactionSpecs { @@ -13,10 +13,10 @@ namespace Gorilla.Commons.Infrastructure.Transactions public class behaves_like_transaction : concerns_for<ITransaction, Transaction> { context c = () => - { - database = the_dependency<IDatabase>(); - factory = the_dependency<IChangeTrackerFactory>(); - }; + { + database = the_dependency<IDatabase>(); + factory = the_dependency<IChangeTrackerFactory>(); + }; static protected IDatabase database; static protected IChangeTrackerFactory factory; @@ -36,24 +36,24 @@ namespace Gorilla.Commons.Infrastructure.Transactions public class when_committing_a_transaction_and_an_item_in_the_identity_map_has_changed : behaves_like_transaction { it should_commit_the_changes_to_that_item = - () => tracker.was_told_to<IChangeTracker<IMovie>>(x => x.commit_to(database)); + () => tracker.was_told_to(x => x.commit_to(database)); context c = () => - { - movie = new Movie("Goldeneye"); - tracker = an<IChangeTracker<IMovie>>(); + { + movie = new Movie("Goldeneye"); + tracker = an<IChangeTracker<IMovie>>(); - when_the(factory).is_told_to(x => x.create_for<IMovie>()).it_will_return(tracker); - when_the(tracker).is_told_to(x => x.is_dirty()).it_will_return(true); - }; + when_the(factory).is_told_to(x => x.create_for<IMovie>()).it_will_return(tracker); + when_the(tracker).is_told_to(x => x.is_dirty()).it_will_return(true); + }; because b = () => - { - sut.create_for<IMovie>().add(movie.id, movie); - movie.change_name_to("Austin Powers"); - sut.commit_changes(); - }; + { + sut.create_for<IMovie>().add(movie.id, movie); + movie.change_name_to("Austin Powers"); + sut.commit_changes(); + }; static IMovie movie; static IChangeTracker<IMovie> tracker; @@ -67,21 +67,21 @@ namespace Gorilla.Commons.Infrastructure.Transactions it should_delete_all_items_marked_for_deletion = () => tracker.was_told_to(x => x.commit_to(database)); context c = () => - { - movie = new Movie("Goldeneye"); - tracker = an<IChangeTracker<IMovie>>(); + { + movie = new Movie("Goldeneye"); + tracker = an<IChangeTracker<IMovie>>(); - when_the(factory).is_told_to(x => x.create_for<IMovie>()).it_will_return(tracker); - when_the(tracker).is_told_to(x => x.is_dirty()).it_will_return(true); - }; + when_the(factory).is_told_to(x => x.create_for<IMovie>()).it_will_return(tracker); + when_the(tracker).is_told_to(x => x.is_dirty()).it_will_return(true); + }; because b = () => - { - var map = sut.create_for<IMovie>(); - map.add(movie.id, movie); - map.evict(movie.id); - sut.commit_changes(); - }; + { + var map = sut.create_for<IMovie>(); + map.add(movie.id, movie); + map.evict(movie.id); + sut.commit_changes(); + }; static IMovie movie; static IChangeTracker<IMovie> tracker; diff --git a/product/DataAccess/Transactions/TypedKey.cs b/product/DataAccess/Transactions/TypedKey.cs index 1452f4a..0735f34 100644 --- a/product/DataAccess/Transactions/TypedKey.cs +++ b/product/DataAccess/Transactions/TypedKey.cs @@ -1,6 +1,6 @@ using System.Collections; -namespace Gorilla.Commons.Infrastructure.Transactions +namespace MoMoney.DataAccess.Transactions { public class TypedKey<T> : IKey<T> { diff --git a/product/Domain/Accounting/GeneralLedgerSpecs.cs b/product/Domain/Accounting/GeneralLedgerSpecs.cs index 9b07f04..a5a33a0 100644 --- a/product/Domain/Accounting/GeneralLedgerSpecs.cs +++ b/product/Domain/Accounting/GeneralLedgerSpecs.cs @@ -36,7 +36,7 @@ namespace MoMoney.Domain.accounting }; it should_not_return_any_entries_that_were_not_posted_for_that_month = - () => Assertions.should_not_contain(result, april_first); + () => result.should_not_contain(april_first); context c = () => { diff --git a/product/Presentation/Core/ApplicationControllerSpecs.cs b/product/Presentation/Core/ApplicationControllerSpecs.cs index 457ead8..4b2a5e4 100644 --- a/product/Presentation/Core/ApplicationControllerSpecs.cs +++ b/product/Presentation/Core/ApplicationControllerSpecs.cs @@ -1,7 +1,6 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Core; namespace MoMoney.Presentation.Core { diff --git a/product/Presentation/Core/ContentPresenter.cs b/product/Presentation/Core/ContentPresenter.cs index f77580b..b1dfe18 100644 --- a/product/Presentation/Core/ContentPresenter.cs +++ b/product/Presentation/Core/ContentPresenter.cs @@ -1,4 +1,4 @@ -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Views; namespace MoMoney.Presentation.Core { diff --git a/product/Presentation/Core/IContentPresenter.cs b/product/Presentation/Core/IContentPresenter.cs index 8de4b4e..ee9610b 100644 --- a/product/Presentation/Core/IContentPresenter.cs +++ b/product/Presentation/Core/IContentPresenter.cs @@ -1,4 +1,4 @@ -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Views; namespace MoMoney.Presentation.Core { diff --git a/product/Presentation/Model/FileSystem/folder.cs b/product/Presentation/Model/FileSystem/folder.cs index 3f5e9ff..9aa8c0e 100644 --- a/product/Presentation/Model/FileSystem/folder.cs +++ b/product/Presentation/Model/FileSystem/folder.cs @@ -1,4 +1,4 @@ -namespace MoMoney.Presentation.Model.file_system +namespace MoMoney.Presentation.Model.FileSystem { public interface IFolder { diff --git a/product/Presentation/Model/Menu/File/CloseProjectCommand.cs b/product/Presentation/Model/Menu/File/CloseProjectCommand.cs index 8638f30..c477e84 100644 --- a/product/Presentation/Model/Menu/File/CloseProjectCommand.cs +++ b/product/Presentation/Model/Menu/File/CloseProjectCommand.cs @@ -2,7 +2,7 @@ using Gorilla.Commons.Infrastructure.Logging; using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Model.Projects; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface ICloseCommand : ICommand, ISaveChangesCallback, ILoggable { diff --git a/product/Presentation/Model/Menu/File/CloseWindowCommand.cs b/product/Presentation/Model/Menu/File/CloseWindowCommand.cs index 3d1dacd..bfd53c1 100644 --- a/product/Presentation/Model/Menu/File/CloseWindowCommand.cs +++ b/product/Presentation/Model/Menu/File/CloseWindowCommand.cs @@ -1,7 +1,7 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface ICloseWindowCommand : ICommand { diff --git a/product/Presentation/Model/Menu/File/ExitCommand.cs b/product/Presentation/Model/Menu/File/ExitCommand.cs index 2616a04..980206a 100644 --- a/product/Presentation/Model/Menu/File/ExitCommand.cs +++ b/product/Presentation/Model/Menu/File/ExitCommand.cs @@ -3,7 +3,7 @@ using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.messages; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface IExitCommand : ICommand, ISaveChangesCallback { diff --git a/product/Presentation/Model/Menu/File/ExitCommandSpecs.cs b/product/Presentation/Model/Menu/File/ExitCommandSpecs.cs index de71bb0..50946e9 100644 --- a/product/Presentation/Model/Menu/File/ExitCommandSpecs.cs +++ b/product/Presentation/Model/Menu/File/ExitCommandSpecs.cs @@ -4,7 +4,7 @@ using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.messages; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { [Concern(typeof (ExitCommand))] public abstract class behaves_like_exit_command : concerns_for<IExitCommand> @@ -15,11 +15,11 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands } context c = () => - { - application = the_dependency<IApplication>(); - broker = the_dependency<IEventAggregator>(); - save_changes_command = the_dependency<ISaveChangesCommand>(); - }; + { + application = the_dependency<IApplication>(); + broker = the_dependency<IEventAggregator>(); + save_changes_command = the_dependency<ISaveChangesCommand>(); + }; protected static IApplication application; protected static IEventAggregator broker; diff --git a/product/Presentation/Model/Menu/File/FileMenu.cs b/product/Presentation/Model/Menu/File/FileMenu.cs index 4879bac..ff4c6a3 100644 --- a/product/Presentation/Model/Menu/File/FileMenu.cs +++ b/product/Presentation/Model/Menu/File/FileMenu.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using MoMoney.Presentation.Model.Menu.File.Commands; using MoMoney.Presentation.Model.Projects; using MoMoney.Presentation.Winforms.Keyboard; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Presentation/Model/Menu/File/NewCommand.cs b/product/Presentation/Model/Menu/File/NewCommand.cs index 52fff6a..a49bb2e 100644 --- a/product/Presentation/Model/Menu/File/NewCommand.cs +++ b/product/Presentation/Model/Menu/File/NewCommand.cs @@ -1,7 +1,7 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Model.Projects; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface INewCommand : ICommand, ISaveChangesCallback { diff --git a/product/Presentation/Model/Menu/File/NewCommandSpecs.cs b/product/Presentation/Model/Menu/File/NewCommandSpecs.cs index f3384ee..de75a6e 100644 --- a/product/Presentation/Model/Menu/File/NewCommandSpecs.cs +++ b/product/Presentation/Model/Menu/File/NewCommandSpecs.cs @@ -2,16 +2,16 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.Projects; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { [Concern(typeof (NewCommand))] public abstract class behaves_like_new_command : concerns_for<INewCommand, NewCommand> { context c = () => - { - current_project = the_dependency<IProjectController>(); - save_changes_command = the_dependency<ISaveChangesCommand>(); - }; + { + current_project = the_dependency<IProjectController>(); + save_changes_command = the_dependency<ISaveChangesCommand>(); + }; protected static IProjectController current_project; protected static ISaveChangesCommand save_changes_command; diff --git a/product/Presentation/Model/Menu/File/OpenCommand.cs b/product/Presentation/Model/Menu/File/OpenCommand.cs index d01e72d..aa26e5b 100644 --- a/product/Presentation/Model/Menu/File/OpenCommand.cs +++ b/product/Presentation/Model/Menu/File/OpenCommand.cs @@ -1,8 +1,8 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Model.Projects; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface IOpenCommand : ICommand, ISaveChangesCallback { diff --git a/product/Presentation/Model/Menu/File/OpenCommandSpecs.cs b/product/Presentation/Model/Menu/File/OpenCommandSpecs.cs index ad8d3ee..eb379be 100644 --- a/product/Presentation/Model/Menu/File/OpenCommandSpecs.cs +++ b/product/Presentation/Model/Menu/File/OpenCommandSpecs.cs @@ -2,19 +2,19 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Infrastructure.FileSystem; using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.Projects; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { [Concern(typeof (OpenCommand))] public abstract class behaves_like_command_to_open_a_project : concerns_for<IOpenCommand, OpenCommand> { context c = () => - { - view = the_dependency<ISelectFileToOpenDialog>(); - project = the_dependency<IProjectController>(); - save_changes_command = the_dependency<ISaveChangesCommand>(); - }; + { + view = the_dependency<ISelectFileToOpenDialog>(); + project = the_dependency<IProjectController>(); + save_changes_command = the_dependency<ISaveChangesCommand>(); + }; protected static IProjectController project; protected static ISelectFileToOpenDialog view; @@ -37,10 +37,10 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands () => project.was_told_to(x => x.open_project_from(file_path)); context c = () => - { - file_path = "blah_blah"; - when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(file_path); - }; + { + file_path = "blah_blah"; + when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(file_path); + }; because b = () => sut.saved(); @@ -54,10 +54,10 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands () => project.was_told_to(x => x.open_project_from(file_path)); context c = () => - { - file_path = "blah_blah"; - when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(file_path); - }; + { + file_path = "blah_blah"; + when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(file_path); + }; because b = () => sut.not_saved(); @@ -72,10 +72,10 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands () => project.was_not_told_to(x => x.open_project_from(file_path)); context c = () => - { - file_path = "blah_blah"; - when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(file_path); - }; + { + file_path = "blah_blah"; + when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(file_path); + }; because b = () => sut.cancelled(); diff --git a/product/Presentation/Model/Menu/File/SaveAsCommand.cs b/product/Presentation/Model/Menu/File/SaveAsCommand.cs index 4948136..84d2c80 100644 --- a/product/Presentation/Model/Menu/File/SaveAsCommand.cs +++ b/product/Presentation/Model/Menu/File/SaveAsCommand.cs @@ -1,8 +1,8 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Model.Projects; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface ISaveAsCommand : ICommand { diff --git a/product/Presentation/Model/Menu/File/SaveAsCommandSpecs.cs b/product/Presentation/Model/Menu/File/SaveAsCommandSpecs.cs index a3a2995..679f29a 100644 --- a/product/Presentation/Model/Menu/File/SaveAsCommandSpecs.cs +++ b/product/Presentation/Model/Menu/File/SaveAsCommandSpecs.cs @@ -2,9 +2,9 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Infrastructure.FileSystem; using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.Projects; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { [Concern(typeof (SaveAsCommand))] public class when_saving_the_current_project_to_a_new_file_path : concerns_for<ISaveAsCommand, SaveAsCommand> @@ -12,13 +12,13 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands it should_save_the_current_project_to_the_new_path = () => current_project.was_told_to(x => x.save_project_to(new_path)); context c = () => - { - current_project = an<IProjectController>(); - view = an<ISelectFileToSaveToDialog>(); - new_path = "blah_blah"; + { + current_project = an<IProjectController>(); + view = an<ISelectFileToSaveToDialog>(); + new_path = "blah_blah"; - when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(new_path); - }; + when_the(view).is_told_to(x => x.tell_me_the_path_to_the_file()).it_will_return(new_path); + }; because b = () => sut.run(); diff --git a/product/Presentation/Model/Menu/File/SaveChangesCommand.cs b/product/Presentation/Model/Menu/File/SaveChangesCommand.cs index 9dfbfd8..5ec6d24 100644 --- a/product/Presentation/Model/Menu/File/SaveChangesCommand.cs +++ b/product/Presentation/Model/Menu/File/SaveChangesCommand.cs @@ -2,9 +2,9 @@ using System; using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.Projects; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface ISaveChangesCommand : IParameterizedCommand<ISaveChangesCallback> { diff --git a/product/Presentation/Model/Menu/File/SaveCommand.cs b/product/Presentation/Model/Menu/File/SaveCommand.cs index 4b22cb2..fd7b68f 100644 --- a/product/Presentation/Model/Menu/File/SaveCommand.cs +++ b/product/Presentation/Model/Menu/File/SaveCommand.cs @@ -1,7 +1,7 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Model.Projects; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { public interface ISaveCommand : ICommand { diff --git a/product/Presentation/Model/Menu/File/SaveCommandSpecs.cs b/product/Presentation/Model/Menu/File/SaveCommandSpecs.cs index df41c74..74c4e90 100644 --- a/product/Presentation/Model/Menu/File/SaveCommandSpecs.cs +++ b/product/Presentation/Model/Menu/File/SaveCommandSpecs.cs @@ -2,7 +2,7 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.Projects; -namespace MoMoney.Presentation.Model.Menu.File.Commands +namespace MoMoney.Presentation.Model.Menu.File { [Concern(typeof (SaveCommand))] public abstract class behaves_like_the_save_command : concerns_for<ISaveCommand, SaveCommand> @@ -13,10 +13,10 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands } context c = () => - { - current_project = an<IProjectController>(); - save_as_command = an<ISaveAsCommand>(); - }; + { + current_project = an<IProjectController>(); + save_as_command = an<ISaveAsCommand>(); + }; protected static ISaveAsCommand save_as_command; protected static IProjectController current_project; } diff --git a/product/Presentation/Model/Menu/Help/HelpMenu.cs b/product/Presentation/Model/Menu/Help/HelpMenu.cs index bb5390c..c41581f 100644 --- a/product/Presentation/Model/Menu/Help/HelpMenu.cs +++ b/product/Presentation/Model/Menu/Help/HelpMenu.cs @@ -1,9 +1,5 @@ -using System; using System.Collections.Generic; -using MoMoney.Presentation.Model.Menu.Help.commands; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Shell; -using MoMoney.Presentation.Presenters.updates; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Model.Menu.Help diff --git a/product/Presentation/Model/Menu/Help/display_information_about_the_application.cs b/product/Presentation/Model/Menu/Help/display_information_about_the_application.cs index ebdc4ec..08016bd 100644 --- a/product/Presentation/Model/Menu/Help/display_information_about_the_application.cs +++ b/product/Presentation/Model/Menu/Help/display_information_about_the_application.cs @@ -1,8 +1,7 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.Menu.Help; -namespace MoMoney.Presentation.Model.Menu.Help.commands +namespace MoMoney.Presentation.Model.Menu.Help { public interface IDisplayInformationAboutTheApplication : ICommand { diff --git a/product/Presentation/Model/Menu/Window/WindowMenu.cs b/product/Presentation/Model/Menu/Window/WindowMenu.cs index 2a6a573..a670c91 100644 --- a/product/Presentation/Model/Menu/Window/WindowMenu.cs +++ b/product/Presentation/Model/Menu/Window/WindowMenu.cs @@ -1,5 +1,5 @@ using System.Collections.Generic; -using MoMoney.Presentation.Model.Menu.File.Commands; +using MoMoney.Presentation.Model.Menu.File; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Model.Menu.window diff --git a/product/Presentation/Model/Navigation/AddBillPaymentBranch.cs b/product/Presentation/Model/Navigation/AddBillPaymentBranch.cs index 28b6454..4d48069 100644 --- a/product/Presentation/Model/Navigation/AddBillPaymentBranch.cs +++ b/product/Presentation/Model/Navigation/AddBillPaymentBranch.cs @@ -1,5 +1,4 @@ using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Presenters.billing; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Model.Navigation diff --git a/product/Presentation/Model/Navigation/ViewAllBillsBranch.cs b/product/Presentation/Model/Navigation/ViewAllBillsBranch.cs index cec80a4..5a6a837 100644 --- a/product/Presentation/Model/Navigation/ViewAllBillsBranch.cs +++ b/product/Presentation/Model/Navigation/ViewAllBillsBranch.cs @@ -1,5 +1,4 @@ -using MoMoney.Presentation.Presenters.billing; -using MoMoney.Presentation.Presenters.Commands; +using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Model.Navigation diff --git a/product/Presentation/Model/Projects/ProjectController.cs b/product/Presentation/Model/Projects/ProjectController.cs index 3fffb22..d798d3c 100644 --- a/product/Presentation/Model/Projects/ProjectController.cs +++ b/product/Presentation/Model/Projects/ProjectController.cs @@ -4,8 +4,8 @@ using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Model.messages; using MoMoney.Service.Contracts.Infrastructure; +using MoMoney.Service.Contracts.Infrastructure.Transactions; using MoMoney.Service.Infrastructure.Eventing; -using MoMoney.Service.Infrastructure.Transactions; namespace MoMoney.Presentation.Model.Projects { diff --git a/product/Presentation/Model/Projects/ProjectControllerSpecs.cs b/product/Presentation/Model/Projects/ProjectControllerSpecs.cs index ae1124c..96fad57 100644 --- a/product/Presentation/Model/Projects/ProjectControllerSpecs.cs +++ b/product/Presentation/Model/Projects/ProjectControllerSpecs.cs @@ -5,8 +5,8 @@ using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Model.messages; using MoMoney.Service.Contracts.Infrastructure; +using MoMoney.Service.Contracts.Infrastructure.Transactions; using MoMoney.Service.Infrastructure.Eventing; -using MoMoney.Service.Infrastructure.Transactions; namespace MoMoney.Presentation.Model.Projects { @@ -34,7 +34,6 @@ namespace MoMoney.Presentation.Model.Projects context c = () => { file_to_update = an<IFile>(); - current_file = an<IFile>(); when_the(file_to_update).is_told_to(x => x.does_the_file_exist()).it_will_return(true); }; @@ -45,7 +44,6 @@ namespace MoMoney.Presentation.Model.Projects }; static IFile file_to_update; - static IFile current_file; } public class when_attempting_to_save_the_changes_to_a_project_and_a_file_to_save_to_has_not_been_specified : diff --git a/product/Presentation/Presentation.csproj b/product/Presentation/Presentation.csproj index 156b797..26684c0 100644 --- a/product/Presentation/Presentation.csproj +++ b/product/Presentation/Presentation.csproj @@ -542,6 +542,10 @@ <Project>{7EA4C557-6EF2-4B1F-85C8-5B3F51BAD8DB}</Project> <Name>Service</Name> </ProjectReference> + <ProjectReference Include="..\utility\utility.csproj"> + <Project>{22DF610D-CBC8-4042-A470-ABF246C5DDD4}</Project> + <Name>utility</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. diff --git a/product/Presentation/Presenters/AboutTheApplicationPresenter.cs b/product/Presentation/Presenters/AboutTheApplicationPresenter.cs index 328004e..a5ebf64 100644 --- a/product/Presentation/Presenters/AboutTheApplicationPresenter.cs +++ b/product/Presentation/Presenters/AboutTheApplicationPresenter.cs @@ -1,7 +1,7 @@ using MoMoney.Presentation.Core; -using MoMoney.Presentation.Views.Menu; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Presenters.Menu.Help +namespace MoMoney.Presentation.Presenters { public interface IAboutApplicationPresenter : IContentPresenter { diff --git a/product/Presentation/Presenters/AddBillPaymentPresenter.cs b/product/Presentation/Presenters/AddBillPaymentPresenter.cs index 241d4ed..f77b325 100644 --- a/product/Presentation/Presenters/AddBillPaymentPresenter.cs +++ b/product/Presentation/Presenters/AddBillPaymentPresenter.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using MoMoney.DTO; using MoMoney.Presentation.Core; -using MoMoney.Presentation.Views.billing; +using MoMoney.Presentation.Views; using MoMoney.Service.Contracts.Application; -namespace MoMoney.Presentation.Presenters.billing +namespace MoMoney.Presentation.Presenters { public interface IAddBillPaymentPresenter : IContentPresenter { diff --git a/product/Presentation/Presenters/AddBillingTaskPane.cs b/product/Presentation/Presenters/AddBillingTaskPane.cs index a172332..c6e6c5f 100644 --- a/product/Presentation/Presenters/AddBillingTaskPane.cs +++ b/product/Presentation/Presenters/AddBillingTaskPane.cs @@ -1,5 +1,3 @@ -using MoMoney.Presentation.Presenters.billing; -using MoMoney.Presentation.Presenters.Navigation; using MoMoney.Presentation.Winforms.Resources; using XPExplorerBar; diff --git a/product/Presentation/Presenters/AddCompanyTaskPane.cs b/product/Presentation/Presenters/AddCompanyTaskPane.cs index f252472..63d5e20 100644 --- a/product/Presentation/Presenters/AddCompanyTaskPane.cs +++ b/product/Presentation/Presenters/AddCompanyTaskPane.cs @@ -1,4 +1,3 @@ -using MoMoney.Presentation.Presenters.Navigation; using MoMoney.Presentation.Winforms.Resources; using XPExplorerBar; diff --git a/product/Presentation/Presenters/AddIncomeTaskPane.cs b/product/Presentation/Presenters/AddIncomeTaskPane.cs index ead319c..dbc5415 100644 --- a/product/Presentation/Presenters/AddIncomeTaskPane.cs +++ b/product/Presentation/Presenters/AddIncomeTaskPane.cs @@ -1,4 +1,3 @@ -using MoMoney.Presentation.Presenters.Navigation; using MoMoney.Presentation.Winforms.Resources; using XPExplorerBar; diff --git a/product/Presentation/Presenters/AddNewIncomePresenterSpecs.cs b/product/Presentation/Presenters/AddNewIncomePresenterSpecs.cs index 1231d11..5ba73fe 100644 --- a/product/Presentation/Presenters/AddNewIncomePresenterSpecs.cs +++ b/product/Presentation/Presenters/AddNewIncomePresenterSpecs.cs @@ -5,17 +5,17 @@ using MoMoney.DTO; using MoMoney.Presentation.Views; using MoMoney.Service.Contracts.Application; -namespace MoMoney.Presentation.Presenters.income +namespace MoMoney.Presentation.Presenters { [Concern(typeof (AddNewIncomePresenter))] public abstract class behaves_like_add_new_income_presenter : concerns_for<IAddNewIncomePresenter, AddNewIncomePresenter> { context c = () => - { - view = the_dependency<IAddNewIncomeView>(); - pump = the_dependency<ICommandPump>(); - }; + { + view = the_dependency<IAddNewIncomeView>(); + pump = the_dependency<ICommandPump>(); + }; static protected ICommandPump pump; static protected IAddNewIncomeView view; diff --git a/product/Presentation/Presenters/AddReportingTaskPane.cs b/product/Presentation/Presenters/AddReportingTaskPane.cs index 28adb1e..d89f31d 100644 --- a/product/Presentation/Presenters/AddReportingTaskPane.cs +++ b/product/Presentation/Presenters/AddReportingTaskPane.cs @@ -1,6 +1,5 @@ using System.Collections.Generic; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.Navigation; using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; using MoMoney.Service.Contracts.Application; diff --git a/product/Presentation/Presenters/ApplicationMenuPresenter.cs b/product/Presentation/Presenters/ApplicationMenuPresenter.cs index 896e722..45396b7 100644 --- a/product/Presentation/Presenters/ApplicationMenuPresenter.cs +++ b/product/Presentation/Presenters/ApplicationMenuPresenter.cs @@ -2,9 +2,9 @@ using System.Windows.Forms; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.Menu; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Presenters.Menu +namespace MoMoney.Presentation.Presenters { public interface IApplicationMenuPresenter : IPresenter { diff --git a/product/Presentation/Presenters/ApplicationShellPresenter.cs b/product/Presentation/Presenters/ApplicationShellPresenter.cs index 237a912..e7553a5 100644 --- a/product/Presentation/Presenters/ApplicationShellPresenter.cs +++ b/product/Presentation/Presenters/ApplicationShellPresenter.cs @@ -1,10 +1,10 @@ using MoMoney.Presentation.Core; -using MoMoney.Presentation.Model.Menu.File.Commands; +using MoMoney.Presentation.Model.Menu.File; using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface IApplicationShellPresenter : IPresenter, IEventSubscriber<ClosingProjectEvent> { diff --git a/product/Presentation/Presenters/Build.cs b/product/Presentation/Presenters/Build.cs index 0ac7ef1..abc50bb 100644 --- a/product/Presentation/Presenters/Build.cs +++ b/product/Presentation/Presenters/Build.cs @@ -1,4 +1,4 @@ -namespace MoMoney.Presentation.Presenters.Navigation +namespace MoMoney.Presentation.Presenters { public class Build { diff --git a/product/Presentation/Presenters/CheckForUpdatesPresenter.cs b/product/Presentation/Presenters/CheckForUpdatesPresenter.cs index ea05878..3fd7300 100644 --- a/product/Presentation/Presenters/CheckForUpdatesPresenter.cs +++ b/product/Presentation/Presenters/CheckForUpdatesPresenter.cs @@ -3,13 +3,10 @@ using Gorilla.Commons.Utility; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; using MoMoney.Presentation.Core; -using MoMoney.Presentation.Presenters.Commands; -using MoMoney.Presentation.Views.updates; +using MoMoney.Presentation.Views; using MoMoney.Service.Contracts.Infrastructure.Updating; -using MoMoney.Service.Infrastructure.Updating; -using MoMoney.Tasks.infrastructure.updating; -namespace MoMoney.Presentation.Presenters.updates +namespace MoMoney.Presentation.Presenters { public interface ICheckForUpdatesPresenter : IPresenter, ICallback<Percent> { diff --git a/product/Presentation/Presenters/CheckForUpdatesPresenterSpecs.cs b/product/Presentation/Presenters/CheckForUpdatesPresenterSpecs.cs index 651886b..92ac3a3 100644 --- a/product/Presentation/Presenters/CheckForUpdatesPresenterSpecs.cs +++ b/product/Presentation/Presenters/CheckForUpdatesPresenterSpecs.cs @@ -3,23 +3,20 @@ using Gorilla.Commons.Testing; using Gorilla.Commons.Utility; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.Commands; -using MoMoney.Presentation.Views.updates; +using MoMoney.Presentation.Views; using MoMoney.Service.Contracts.Infrastructure.Updating; -using MoMoney.Service.Infrastructure.Updating; -using MoMoney.Tasks.infrastructure.updating; -namespace MoMoney.Presentation.Presenters.updates +namespace MoMoney.Presentation.Presenters { [Concern(typeof (CheckForUpdatesPresenter))] public abstract class behaves_like_check_for_updates_presenter : concerns_for<ICheckForUpdatesPresenter, CheckForUpdatesPresenter> { context c = () => - { - view = the_dependency<ICheckForUpdatesView>(); - pump = the_dependency<ICommandPump>(); - }; + { + view = the_dependency<ICheckForUpdatesView>(); + pump = the_dependency<ICommandPump>(); + }; static protected ICheckForUpdatesView view; static protected ICommandPump pump; diff --git a/product/Presentation/Presenters/CommandFactory.cs b/product/Presentation/Presenters/CommandFactory.cs index 49699d6..332a5f2 100644 --- a/product/Presentation/Presenters/CommandFactory.cs +++ b/product/Presentation/Presenters/CommandFactory.cs @@ -1,6 +1,5 @@ -using Gorilla.Commons.Infrastructure.Threading; using Gorilla.Commons.Utility.Core; -using MoMoney.Presentation.Presenters.Commands; +using MoMoney.Service.Infrastructure.Threading; namespace MoMoney.Presentation.Presenters { diff --git a/product/Presentation/Presenters/ExpandoBuilder.cs b/product/Presentation/Presenters/ExpandoBuilder.cs index fc1fffe..d43c6b1 100644 --- a/product/Presentation/Presenters/ExpandoBuilder.cs +++ b/product/Presentation/Presenters/ExpandoBuilder.cs @@ -5,7 +5,7 @@ using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; using XPExplorerBar; -namespace MoMoney.Presentation.Presenters.Navigation +namespace MoMoney.Presentation.Presenters { public interface IExpandoBuilder : IBuilder<Expando> { diff --git a/product/Presentation/Presenters/GettingStartedPresenter.cs b/product/Presentation/Presenters/GettingStartedPresenter.cs index c647117..9e3bb3f 100644 --- a/product/Presentation/Presenters/GettingStartedPresenter.cs +++ b/product/Presentation/Presenters/GettingStartedPresenter.cs @@ -1,7 +1,7 @@ using MoMoney.Presentation.Core; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface IGettingStartedPresenter : IContentPresenter { diff --git a/product/Presentation/Presenters/GettingStartedPresenterSpecs.cs b/product/Presentation/Presenters/GettingStartedPresenterSpecs.cs index 14ada1d..8299d60 100644 --- a/product/Presentation/Presenters/GettingStartedPresenterSpecs.cs +++ b/product/Presentation/Presenters/GettingStartedPresenterSpecs.cs @@ -1,9 +1,9 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public class GettingStartedPresenterSpecs { @@ -11,10 +11,10 @@ namespace MoMoney.Presentation.Presenters.Shell concerns_for<IGettingStartedPresenter, GettingStartedPresenter> { context c = () => - { - view = the_dependency<IGettingStartedView>(); - broker = the_dependency<IEventAggregator>(); - }; + { + view = the_dependency<IGettingStartedView>(); + broker = the_dependency<IEventAggregator>(); + }; static protected IEventAggregator broker; static protected IGettingStartedView view; diff --git a/product/Presentation/Presenters/IActionTaskPaneFactory.cs b/product/Presentation/Presenters/IActionTaskPaneFactory.cs index 18ede18..81b358e 100644 --- a/product/Presentation/Presenters/IActionTaskPaneFactory.cs +++ b/product/Presentation/Presenters/IActionTaskPaneFactory.cs @@ -1,7 +1,7 @@ using Gorilla.Commons.Utility.Core; using XPExplorerBar; -namespace MoMoney.Presentation.Presenters.Navigation +namespace MoMoney.Presentation.Presenters { public interface IActionTaskPaneFactory : IFactory<Expando> { diff --git a/product/Presentation/Presenters/ISplashScreenState.cs b/product/Presentation/Presenters/ISplashScreenState.cs index c0e4ee5..086331e 100644 --- a/product/Presentation/Presenters/ISplashScreenState.cs +++ b/product/Presentation/Presenters/ISplashScreenState.cs @@ -1,4 +1,4 @@ -namespace MoMoney.Presentation.Presenters.Startup +namespace MoMoney.Presentation.Presenters { public interface ISplashScreenState { diff --git a/product/Presentation/Presenters/LogFilePresenter.cs b/product/Presentation/Presenters/LogFilePresenter.cs index a7a04fe..92e8811 100644 --- a/product/Presentation/Presenters/LogFilePresenter.cs +++ b/product/Presentation/Presenters/LogFilePresenter.cs @@ -1,8 +1,8 @@ using MoMoney.Presentation.Core; -using MoMoney.Presentation.Views.Shell; -using MoMoney.Service.Infrastructure.Logging; +using MoMoney.Presentation.Views; +using MoMoney.Service.Contracts.Infrastructure.Logging; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface ILogFilePresenter : IContentPresenter { diff --git a/product/Presentation/Presenters/LogFileViewPresenterSpecs.cs b/product/Presentation/Presenters/LogFileViewPresenterSpecs.cs index 2195c13..912ce33 100644 --- a/product/Presentation/Presenters/LogFileViewPresenterSpecs.cs +++ b/product/Presentation/Presenters/LogFileViewPresenterSpecs.cs @@ -1,17 +1,17 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Presentation.Views.Shell; -using MoMoney.Service.Infrastructure.Logging; +using MoMoney.Presentation.Views; +using MoMoney.Service.Contracts.Infrastructure.Logging; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public class behaves_like_log_file_presenter : concerns_for<ILogFilePresenter, LogFilePresenter> { context c = () => - { - view = the_dependency<ILogFileView>(); - tasks = the_dependency<ILogFileTasks>(); - }; + { + view = the_dependency<ILogFileView>(); + tasks = the_dependency<ILogFileTasks>(); + }; static protected ILogFileView view; static protected ILogFileTasks tasks; @@ -22,12 +22,12 @@ namespace MoMoney.Presentation.Presenters.Shell it should_display_the_contents_of_the_log_file = () => view.was_told_to(x => x.display(log_file_path)); context c = () => - { - log_file_path = "log.txt"; - log_file_contents = "hello_jello"; - tasks.is_told_to(x => x.get_the_path_to_the_log_file()).it_will_return(log_file_path); - tasks.is_told_to(x => x.get_the_contents_of_the_log_file()).it_will_return(log_file_contents); - }; + { + log_file_path = "log.txt"; + log_file_contents = "hello_jello"; + tasks.is_told_to(x => x.get_the_path_to_the_log_file()).it_will_return(log_file_path); + tasks.is_told_to(x => x.get_the_contents_of_the_log_file()).it_will_return(log_file_contents); + }; because b = () => sut.run(); diff --git a/product/Presentation/Presenters/MainMenuPresenter.cs b/product/Presentation/Presenters/MainMenuPresenter.cs index 4c1849b..3f30325 100644 --- a/product/Presentation/Presenters/MainMenuPresenter.cs +++ b/product/Presentation/Presenters/MainMenuPresenter.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Core; -using MoMoney.Presentation.Presenters.Navigation; using MoMoney.Presentation.Views; namespace MoMoney.Presentation.Presenters diff --git a/product/Presentation/Presenters/NavigationPresenter.cs b/product/Presentation/Presenters/NavigationPresenter.cs index 227c921..2e32f5e 100644 --- a/product/Presentation/Presenters/NavigationPresenter.cs +++ b/product/Presentation/Presenters/NavigationPresenter.cs @@ -1,8 +1,8 @@ using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.Navigation; -using MoMoney.Presentation.Views.Navigation; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Presenters.Navigation +namespace MoMoney.Presentation.Presenters { public interface INavigationPresenter : IContentPresenter { diff --git a/product/Presentation/Presenters/NavigationPresenterSpecs.cs b/product/Presentation/Presenters/NavigationPresenterSpecs.cs index 8e8fdd2..cf05dd0 100644 --- a/product/Presentation/Presenters/NavigationPresenterSpecs.cs +++ b/product/Presentation/Presenters/NavigationPresenterSpecs.cs @@ -1,9 +1,9 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.Navigation; -using MoMoney.Presentation.Views.Navigation; +using MoMoney.Presentation.Views; -namespace MoMoney.Presentation.Presenters.Navigation +namespace MoMoney.Presentation.Presenters { [Concern(typeof (NavigationPresenter))] public class when_building_the_navigation_tree : concerns_for<INavigationPresenter, NavigationPresenter> @@ -11,10 +11,10 @@ namespace MoMoney.Presentation.Presenters.Navigation it should_visit_the_root_node_of_the_tree = () => view.was_told_to(x => x.accept(tree_view_visitor)); context c = () => - { - view = the_dependency<INavigationView>(); - tree_view_visitor = the_dependency<INavigationTreeVisitor>(); - }; + { + view = the_dependency<INavigationView>(); + tree_view_visitor = the_dependency<INavigationTreeVisitor>(); + }; because b = () => sut.run(); diff --git a/product/Presentation/Presenters/NotificationIconPresenter.cs b/product/Presentation/Presenters/NotificationIconPresenter.cs index e7b351a..a79f306 100644 --- a/product/Presentation/Presenters/NotificationIconPresenter.cs +++ b/product/Presentation/Presenters/NotificationIconPresenter.cs @@ -1,10 +1,10 @@ using System.Net.NetworkInformation; using MoMoney.Presentation.Model.messages; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface INotificationIconPresenter : IModule, IEventSubscriber<ClosingTheApplication>, diff --git a/product/Presentation/Presenters/NotificationIconPresenterSpecs.cs b/product/Presentation/Presenters/NotificationIconPresenterSpecs.cs index a62af6f..c967371 100644 --- a/product/Presentation/Presenters/NotificationIconPresenterSpecs.cs +++ b/product/Presentation/Presenters/NotificationIconPresenterSpecs.cs @@ -1,10 +1,10 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { [Concern(typeof (NotificationIconPresenter))] public abstract class behaves_like_notification_icon_presenter : concerns_for<INotificationIconPresenter, NotificationIconPresenter> @@ -15,10 +15,10 @@ namespace MoMoney.Presentation.Presenters.Shell //} context c = () => - { - view = the_dependency<INotificationIconView>(); - broker = the_dependency<IEventAggregator>(); - }; + { + view = the_dependency<INotificationIconView>(); + broker = the_dependency<IEventAggregator>(); + }; protected static INotificationIconView view; protected static IEventAggregator broker; diff --git a/product/Presentation/Presenters/NotificationPresenter.cs b/product/Presentation/Presenters/NotificationPresenter.cs index 8cbe410..ac5add8 100644 --- a/product/Presentation/Presenters/NotificationPresenter.cs +++ b/product/Presentation/Presenters/NotificationPresenter.cs @@ -3,7 +3,7 @@ using System.Windows.Forms; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public class NotificationPresenter : INotification { diff --git a/product/Presentation/Presenters/ProcessQueryCommand.cs b/product/Presentation/Presenters/ProcessQueryCommand.cs index bf27033..cd0cdff 100644 --- a/product/Presentation/Presenters/ProcessQueryCommand.cs +++ b/product/Presentation/Presenters/ProcessQueryCommand.cs @@ -1,6 +1,6 @@ using System; -using Gorilla.Commons.Infrastructure.Threading; using Gorilla.Commons.Utility.Core; +using MoMoney.Service.Infrastructure.Threading; namespace MoMoney.Presentation.Presenters { diff --git a/product/Presentation/Presenters/RestartCommand.cs b/product/Presentation/Presenters/RestartCommand.cs index 2c2b4f5..2b8fca7 100644 --- a/product/Presentation/Presenters/RestartCommand.cs +++ b/product/Presentation/Presenters/RestartCommand.cs @@ -3,7 +3,7 @@ using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.messages; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Commands +namespace MoMoney.Presentation.Presenters { public interface IRestartCommand : ICommand { diff --git a/product/Presentation/Presenters/RunQueryCommand.cs b/product/Presentation/Presenters/RunQueryCommand.cs index 2516e75..2409389 100644 --- a/product/Presentation/Presenters/RunQueryCommand.cs +++ b/product/Presentation/Presenters/RunQueryCommand.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Utility.Core; -namespace MoMoney.Presentation.Presenters.Commands +namespace MoMoney.Presentation.Presenters { public interface IRunQueryCommand<T> : ICommand { diff --git a/product/Presentation/Presenters/RunThe.cs b/product/Presentation/Presenters/RunThe.cs index 0d42495..bb25ce4 100644 --- a/product/Presentation/Presenters/RunThe.cs +++ b/product/Presentation/Presenters/RunThe.cs @@ -2,7 +2,7 @@ using Gorilla.Commons.Utility.Core; using MoMoney.Presentation.Core; using MoMoney.Service.Infrastructure.Threading; -namespace MoMoney.Presentation.Presenters.Commands +namespace MoMoney.Presentation.Presenters { public interface IRunThe<TPresenter> : ICommand where TPresenter : IPresenter { diff --git a/product/Presentation/Presenters/RunTheSpecs.cs b/product/Presentation/Presenters/RunTheSpecs.cs index fa5b09f..f58c8c1 100644 --- a/product/Presentation/Presenters/RunTheSpecs.cs +++ b/product/Presentation/Presenters/RunTheSpecs.cs @@ -4,7 +4,7 @@ using MbUnit.Framework; using MoMoney.Presentation.Core; using MoMoney.Service.Infrastructure.Threading; -namespace MoMoney.Presentation.Presenters.Commands +namespace MoMoney.Presentation.Presenters { public class RunTheSpecs { @@ -19,10 +19,10 @@ namespace MoMoney.Presentation.Presenters.Commands it should_initialize_the_presenter_that_controls_that_region = () => processor.was_told_to(x => x.add(() => controller.run<IPresenter>())); context c = () => - { - controller = the_dependency<IApplicationController>(); - processor = the_dependency<ICommandProcessor>(); - }; + { + controller = the_dependency<IApplicationController>(); + processor = the_dependency<ICommandProcessor>(); + }; because b = () => sut.run(); diff --git a/product/Presentation/Presenters/SplashScreenPresenter.cs b/product/Presentation/Presenters/SplashScreenPresenter.cs index a917a9e..9416ba7 100644 --- a/product/Presentation/Presenters/SplashScreenPresenter.cs +++ b/product/Presentation/Presenters/SplashScreenPresenter.cs @@ -1,6 +1,4 @@ -using Gorilla.Commons.Infrastructure.Threading; -using MoMoney.Presentation.Presenters.Startup; -using MoMoney.Presentation.Views.Startup; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Views; using MoMoney.Service.Infrastructure.Threading; using MoMoney.Utility.Core; diff --git a/product/Presentation/Presenters/SplashScreenPresenterSpecs.cs b/product/Presentation/Presenters/SplashScreenPresenterSpecs.cs index f4aa04f..fec7eaa 100644 --- a/product/Presentation/Presenters/SplashScreenPresenterSpecs.cs +++ b/product/Presentation/Presenters/SplashScreenPresenterSpecs.cs @@ -1,10 +1,10 @@ using System; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Presentation.Views.Startup; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Threading; -namespace MoMoney.Presentation.Presenters.Startup +namespace MoMoney.Presentation.Presenters { [Concern(typeof (SplashScreenPresenter))] public abstract class behaves_like_splash_screen_presenter : concerns_for<ISplashScreenPresenter> @@ -15,10 +15,10 @@ namespace MoMoney.Presentation.Presenters.Startup } context c = () => - { - timer = the_dependency<ITimer>(); - view = the_dependency<ISplashScreenView>(); - }; + { + timer = the_dependency<ITimer>(); + view = the_dependency<ISplashScreenView>(); + }; protected static ITimer timer; protected static ISplashScreenView view; @@ -41,10 +41,10 @@ namespace MoMoney.Presentation.Presenters.Startup context c = () => when_the(view).is_asked_for(v => v.current_opacity()).it_will_return(0.5); because b = () => - { - sut.run(); - sut.notify(); - }; + { + sut.run(); + sut.notify(); + }; } public class when_the_timer_notifies_the_presenter_to_update_and_the_opacity_of_the_view_has_reached_100_percent : @@ -55,10 +55,10 @@ namespace MoMoney.Presentation.Presenters.Startup context c = () => when_the(view).is_asked_for(v => v.current_opacity()).it_will_return(1); because b = () => - { - sut.run(); - sut.notify(); - }; + { + sut.run(); + sut.notify(); + }; } public class when_hiding_the_splash_screen : behaves_like_splash_screen_presenter @@ -71,10 +71,10 @@ namespace MoMoney.Presentation.Presenters.Startup context c = () => when_the(view).is_asked_for(v => v.current_opacity()).it_will_return(.5); because b = () => - { - sut.Dispose(); - sut.notify(); - }; + { + sut.Dispose(); + sut.notify(); + }; } public class when_the_splash_screen_is_fading_away_and_its_opacity_has_reached_zero : @@ -87,9 +87,9 @@ namespace MoMoney.Presentation.Presenters.Startup context c = () => when_the(view).is_asked_for(v => v.current_opacity()).it_will_return(0); because b = () => - { - sut.Dispose(); - sut.notify(); - }; + { + sut.Dispose(); + sut.notify(); + }; } }
\ No newline at end of file diff --git a/product/Presentation/Presenters/StatusBarPresenterSpecs.cs b/product/Presentation/Presenters/StatusBarPresenterSpecs.cs index 5702512..5cd1ea6 100644 --- a/product/Presentation/Presenters/StatusBarPresenterSpecs.cs +++ b/product/Presentation/Presenters/StatusBarPresenterSpecs.cs @@ -3,7 +3,6 @@ using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.messages; using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; -using MoMoney.Service.Infrastructure.Eventing; namespace MoMoney.Presentation.Presenters { @@ -14,14 +13,12 @@ namespace MoMoney.Presentation.Presenters () => view.was_told_to(v => v.display(ApplicationIcons.green_circle, "Ready")); context c = () => - { - view = the_dependency<IStatusBarView>(); - broker = the_dependency<IEventAggregator>(); - }; + { + view = the_dependency<IStatusBarView>(); + }; because b = () => sut.notify(new NewProjectOpened("")); static IStatusBarView view; - static IEventAggregator broker; } }
\ No newline at end of file diff --git a/product/Presentation/Presenters/TaskTrayPresenter.cs b/product/Presentation/Presenters/TaskTrayPresenter.cs index 474b5f6..8953ac2 100644 --- a/product/Presentation/Presenters/TaskTrayPresenter.cs +++ b/product/Presentation/Presenters/TaskTrayPresenter.cs @@ -1,17 +1,18 @@ +using System.ComponentModel; +using Gorilla.Commons.Infrastructure.Logging; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Model.messages; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; +using momoney.utility; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface ITaskTrayPresenter : IModule, IEventSubscriber<SavedChangesEvent>, IEventSubscriber<StartedRunningCommand>, IEventSubscriber<FinishedRunningCommand>, - IEventSubscriber<NewProjectOpened> - { - } + IEventSubscriber<NewProjectOpened> {} public class TaskTrayPresenter : ITaskTrayPresenter { @@ -44,7 +45,16 @@ namespace MoMoney.Presentation.Presenters.Shell public void notify(StartedRunningCommand message) { - view.display("Running... {0}".formatted_using(message.running_action)); + this.log().debug("running {0}", message.running_action); + if (message.running_action.is_decorated_with<DisplayNameAttribute>()) + { + var attribute = message.running_action.attribute<DisplayNameAttribute>(); + view.display("Running... {0}".formatted_using(attribute.DisplayName)); + } + else + { + view.display("Running... {0}".formatted_using(message.running_action)); + } } public void notify(FinishedRunningCommand message) diff --git a/product/Presentation/Presenters/TitleBarPresenter.cs b/product/Presentation/Presenters/TitleBarPresenter.cs index d0ed0ba..d4c9846 100644 --- a/product/Presentation/Presenters/TitleBarPresenter.cs +++ b/product/Presentation/Presenters/TitleBarPresenter.cs @@ -4,7 +4,7 @@ using MoMoney.Presentation.Model.Projects; using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface ITitleBarPresenter : IModule, IEventSubscriber<UnsavedChangesEvent>, diff --git a/product/Presentation/Presenters/TitleBarPresenterSpecs.cs b/product/Presentation/Presenters/TitleBarPresenterSpecs.cs index 2dcf933..f5c368a 100644 --- a/product/Presentation/Presenters/TitleBarPresenterSpecs.cs +++ b/product/Presentation/Presenters/TitleBarPresenterSpecs.cs @@ -5,17 +5,17 @@ using MoMoney.Presentation.Model.Projects; using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { [Concern(typeof (TitleBarPresenter))] public abstract class behaves_like_a_title_bar_presenter : concerns_for<ITitleBarPresenter, TitleBarPresenter> { context c = () => - { - project = the_dependency<IProjectController>(); - view = the_dependency<ITitleBar>(); - broker = the_dependency<IEventAggregator>(); - }; + { + project = the_dependency<IProjectController>(); + view = the_dependency<ITitleBar>(); + broker = the_dependency<IEventAggregator>(); + }; protected static ITitleBar view; protected static IEventAggregator broker; diff --git a/product/Presentation/Presenters/ToolBarPresenter.cs b/product/Presentation/Presenters/ToolBarPresenter.cs index 69d8798..04f6c3c 100644 --- a/product/Presentation/Presenters/ToolBarPresenter.cs +++ b/product/Presentation/Presenters/ToolBarPresenter.cs @@ -3,12 +3,12 @@ using System.Windows.Forms; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.Menu; -using MoMoney.Presentation.Model.Menu.File.Commands; +using MoMoney.Presentation.Model.Menu.File; using MoMoney.Presentation.Model.Projects; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface IToolbarPresenter : IPresenter { diff --git a/product/Presentation/Presenters/UnhandledErrorPresenter.cs b/product/Presentation/Presenters/UnhandledErrorPresenter.cs index 08f7832..ff0a369 100644 --- a/product/Presentation/Presenters/UnhandledErrorPresenter.cs +++ b/product/Presentation/Presenters/UnhandledErrorPresenter.cs @@ -1,10 +1,9 @@ using MoMoney.Presentation.Core; using MoMoney.Presentation.Model.messages; -using MoMoney.Presentation.Presenters.Commands; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public interface IUnhandledErrorPresenter : IModule, IPresenter, IEventSubscriber<UnhandledErrorOccurred> diff --git a/product/Presentation/Presenters/UnhandledErrorPresenterSpecs.cs b/product/Presentation/Presenters/UnhandledErrorPresenterSpecs.cs index 3bfba56..fbd8772 100644 --- a/product/Presentation/Presenters/UnhandledErrorPresenterSpecs.cs +++ b/product/Presentation/Presenters/UnhandledErrorPresenterSpecs.cs @@ -2,10 +2,10 @@ using System; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using MoMoney.Presentation.Model.messages; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Eventing; -namespace MoMoney.Presentation.Presenters.Shell +namespace MoMoney.Presentation.Presenters { public class behaves_like_unhandled_error_presenter : concerns_for<IUnhandledErrorPresenter, UnhandledErrorPresenter> @@ -16,10 +16,10 @@ namespace MoMoney.Presentation.Presenters.Shell //} context c = () => - { - view = the_dependency<IUnhandledErrorView>(); - broker = the_dependency<IEventAggregator>(); - }; + { + view = the_dependency<IUnhandledErrorView>(); + broker = the_dependency<IEventAggregator>(); + }; protected static IUnhandledErrorView view; protected static IEventAggregator broker; diff --git a/product/Presentation/Presenters/ViewAllBillsPresenter.cs b/product/Presentation/Presenters/ViewAllBillsPresenter.cs index 31dbd3f..2436b7f 100644 --- a/product/Presentation/Presenters/ViewAllBillsPresenter.cs +++ b/product/Presentation/Presenters/ViewAllBillsPresenter.cs @@ -4,7 +4,7 @@ using MoMoney.Presentation.Core; using MoMoney.Presentation.Views; using MoMoney.Service.Contracts.Application; -namespace MoMoney.Presentation.Presenters.billing +namespace MoMoney.Presentation.Presenters { public interface IViewAllBillsPresenter : IContentPresenter { diff --git a/product/Presentation/Presenters/display_the_splash_screen.cs b/product/Presentation/Presenters/display_the_splash_screen.cs index e9fa9ec..06e8331 100644 --- a/product/Presentation/Presenters/display_the_splash_screen.cs +++ b/product/Presentation/Presenters/display_the_splash_screen.cs @@ -1,8 +1,8 @@ using System; -using MoMoney.Presentation.Views.Startup; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Threading; -namespace MoMoney.Presentation.Presenters.Startup +namespace MoMoney.Presentation.Presenters { public class display_the_splash_screen : ISplashScreenState { diff --git a/product/Presentation/Presenters/hide_the_splash_screen.cs b/product/Presentation/Presenters/hide_the_splash_screen.cs index 0422b34..fe90f2e 100644 --- a/product/Presentation/Presenters/hide_the_splash_screen.cs +++ b/product/Presentation/Presenters/hide_the_splash_screen.cs @@ -1,8 +1,8 @@ using System; -using MoMoney.Presentation.Views.Startup; +using MoMoney.Presentation.Views; using MoMoney.Service.Infrastructure.Threading; -namespace MoMoney.Presentation.Presenters.Startup +namespace MoMoney.Presentation.Presenters { public class hide_the_splash_screen : ISplashScreenState { diff --git a/product/Presentation/Views/ControlAction.cs b/product/Presentation/Views/ControlAction.cs index 71e19bb..b66a19f 100644 --- a/product/Presentation/Views/ControlAction.cs +++ b/product/Presentation/Views/ControlAction.cs @@ -1,6 +1,6 @@ using System; -namespace MoMoney.Presentation.Views.Core +namespace MoMoney.Presentation.Views { public delegate void ControlAction<T>(T input) where T : EventArgs; }
\ No newline at end of file diff --git a/product/Presentation/Views/IAboutApplicationView.cs b/product/Presentation/Views/IAboutApplicationView.cs index 9ca118b..6dbf7b5 100644 --- a/product/Presentation/Views/IAboutApplicationView.cs +++ b/product/Presentation/Views/IAboutApplicationView.cs @@ -1,6 +1,4 @@ -using MoMoney.Presentation.Views.Core; - -namespace MoMoney.Presentation.Views.Menu +namespace MoMoney.Presentation.Views { public interface IAboutApplicationView : IDockedContentView { diff --git a/product/Presentation/Views/IAddBillPaymentView.cs b/product/Presentation/Views/IAddBillPaymentView.cs index eadcbca..e61299a 100644 --- a/product/Presentation/Views/IAddBillPaymentView.cs +++ b/product/Presentation/Views/IAddBillPaymentView.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.billing; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; -namespace MoMoney.Presentation.Views.billing +namespace MoMoney.Presentation.Views { public interface IAddBillPaymentView : IDockedContentView, IView<IAddBillPaymentPresenter>, diff --git a/product/Presentation/Views/IAddCompanyView.cs b/product/Presentation/Views/IAddCompanyView.cs index 847381b..f5146aa 100644 --- a/product/Presentation/Views/IAddCompanyView.cs +++ b/product/Presentation/Views/IAddCompanyView.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Views.Core; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/IAddNewIncomeView.cs b/product/Presentation/Views/IAddNewIncomeView.cs index aed4384..0eb5ffa 100644 --- a/product/Presentation/Views/IAddNewIncomeView.cs +++ b/product/Presentation/Views/IAddNewIncomeView.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Views.Core; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/IApplicationDockedWindow.cs b/product/Presentation/Views/IApplicationDockedWindow.cs index 1b9272c..1fc6ed3 100644 --- a/product/Presentation/Views/IApplicationDockedWindow.cs +++ b/product/Presentation/Views/IApplicationDockedWindow.cs @@ -1,4 +1,3 @@ -using MoMoney.Presentation.Views.Core; using MoMoney.Presentation.Winforms.Resources; using WeifenLuo.WinFormsUI.Docking; diff --git a/product/Presentation/Views/IApplicationWindow.cs b/product/Presentation/Views/IApplicationWindow.cs index 5a66cc4..4f6d350 100644 --- a/product/Presentation/Views/IApplicationWindow.cs +++ b/product/Presentation/Views/IApplicationWindow.cs @@ -1,7 +1,6 @@ using System.Windows.Forms; -using MoMoney.Presentation.Views.Core; -namespace MoMoney.Presentation.Views.core +namespace MoMoney.Presentation.Views { public interface IApplicationWindow : IView { diff --git a/product/Presentation/Views/ICheckForUpdatesView.cs b/product/Presentation/Views/ICheckForUpdatesView.cs index e517e15..f6ad222 100644 --- a/product/Presentation/Views/ICheckForUpdatesView.cs +++ b/product/Presentation/Views/ICheckForUpdatesView.cs @@ -1,10 +1,9 @@ using Gorilla.Commons.Utility; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.updates; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; -namespace MoMoney.Presentation.Views.updates +namespace MoMoney.Presentation.Views { public interface ICheckForUpdatesView : IView<ICheckForUpdatesPresenter>, ICallback<ApplicationVersion> { diff --git a/product/Presentation/Views/ICommandDialog.cs b/product/Presentation/Views/ICommandDialog.cs index caf2abd..94bc940 100644 --- a/product/Presentation/Views/ICommandDialog.cs +++ b/product/Presentation/Views/ICommandDialog.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Windows.Forms +namespace MoMoney.Presentation.Views { public interface ICommandDialog<Command> where Command : ICommand { diff --git a/product/Presentation/Views/IDialogLauncher.cs b/product/Presentation/Views/IDialogLauncher.cs index ae01f2a..70be13f 100644 --- a/product/Presentation/Views/IDialogLauncher.cs +++ b/product/Presentation/Views/IDialogLauncher.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Windows.Forms +namespace MoMoney.Presentation.Views { public interface IDialogLauncher { diff --git a/product/Presentation/Views/IDockedContentView.cs b/product/Presentation/Views/IDockedContentView.cs index f97bb7b..0010a1d 100644 --- a/product/Presentation/Views/IDockedContentView.cs +++ b/product/Presentation/Views/IDockedContentView.cs @@ -1,6 +1,6 @@ using WeifenLuo.WinFormsUI.Docking; -namespace MoMoney.Presentation.Views.Core +namespace MoMoney.Presentation.Views { public interface IDockedContentView : IDockContent, IView { diff --git a/product/Presentation/Views/IGettingStartedView.cs b/product/Presentation/Views/IGettingStartedView.cs index 725c408..48a7d6a 100644 --- a/product/Presentation/Views/IGettingStartedView.cs +++ b/product/Presentation/Views/IGettingStartedView.cs @@ -1,7 +1,6 @@ -using MoMoney.Presentation.Presenters.Shell; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; -namespace MoMoney.Presentation.Views.Shell +namespace MoMoney.Presentation.Views { public interface IGettingStartedView : IDockedContentView, IView<IGettingStartedPresenter> diff --git a/product/Presentation/Views/ILogFileView.cs b/product/Presentation/Views/ILogFileView.cs index 00bafdc..2bdaef6 100644 --- a/product/Presentation/Views/ILogFileView.cs +++ b/product/Presentation/Views/ILogFileView.cs @@ -1,7 +1,6 @@ using Gorilla.Commons.Utility.Core; -using MoMoney.Presentation.Views.Core; -namespace MoMoney.Presentation.Views.Shell +namespace MoMoney.Presentation.Views { public interface ILogFileView : IDockedContentView, ICallback<string> { diff --git a/product/Presentation/Views/IMainMenuView.cs b/product/Presentation/Views/IMainMenuView.cs index 432b65b..9b27246 100644 --- a/product/Presentation/Views/IMainMenuView.cs +++ b/product/Presentation/Views/IMainMenuView.cs @@ -1,5 +1,4 @@ -using MoMoney.Presentation.Presenters.Navigation; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/INavigationView.cs b/product/Presentation/Views/INavigationView.cs index 9f3c2f0..f4dc2d2 100644 --- a/product/Presentation/Views/INavigationView.cs +++ b/product/Presentation/Views/INavigationView.cs @@ -1,7 +1,6 @@ using MoMoney.Presentation.Model.Navigation; -using MoMoney.Presentation.Views.Core; -namespace MoMoney.Presentation.Views.Navigation +namespace MoMoney.Presentation.Views { public interface INavigationView : IDockedContentView { diff --git a/product/Presentation/Views/INotificationIconView.cs b/product/Presentation/Views/INotificationIconView.cs index 78c0e3d..6e7e8b5 100644 --- a/product/Presentation/Views/INotificationIconView.cs +++ b/product/Presentation/Views/INotificationIconView.cs @@ -1,7 +1,7 @@ using System; using MoMoney.Presentation.Winforms.Resources; -namespace MoMoney.Presentation.Views.Shell +namespace MoMoney.Presentation.Views { public interface INotificationIconView : IDisposable { diff --git a/product/Presentation/Views/IRegionManager.cs b/product/Presentation/Views/IRegionManager.cs index 00c0c4c..c1b9d08 100644 --- a/product/Presentation/Views/IRegionManager.cs +++ b/product/Presentation/Views/IRegionManager.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; -namespace MoMoney.Presentation.Views.Shell +namespace MoMoney.Presentation.Views { public interface IRegionManager { diff --git a/product/Presentation/Views/IReportViewer.cs b/product/Presentation/Views/IReportViewer.cs index 76b5751..c5ae763 100644 --- a/product/Presentation/Views/IReportViewer.cs +++ b/product/Presentation/Views/IReportViewer.cs @@ -1,5 +1,4 @@ using MoMoney.Presentation.Model.reporting; -using MoMoney.Presentation.Views.Core; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/ISaveChangesView.cs b/product/Presentation/Views/ISaveChangesView.cs index 6a5facd..54b882c 100644 --- a/product/Presentation/Views/ISaveChangesView.cs +++ b/product/Presentation/Views/ISaveChangesView.cs @@ -1,7 +1,6 @@ -using MoMoney.Presentation.Model.Menu.File.Commands; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Model.Menu.File; -namespace MoMoney.Presentation.Views.dialogs +namespace MoMoney.Presentation.Views { public interface ISaveChangesView : IView<ISaveChangesPresenter> { diff --git a/product/Presentation/Views/ISelectFileToOpenDialog.cs b/product/Presentation/Views/ISelectFileToOpenDialog.cs index 3350e4a..56ba65d 100644 --- a/product/Presentation/Views/ISelectFileToOpenDialog.cs +++ b/product/Presentation/Views/ISelectFileToOpenDialog.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Infrastructure.FileSystem; -namespace MoMoney.Presentation.Views.dialogs +namespace MoMoney.Presentation.Views { public interface ISelectFileToOpenDialog { diff --git a/product/Presentation/Views/ISelectFileToSaveToDialog.cs b/product/Presentation/Views/ISelectFileToSaveToDialog.cs index 0d3bf19..48ad3da 100644 --- a/product/Presentation/Views/ISelectFileToSaveToDialog.cs +++ b/product/Presentation/Views/ISelectFileToSaveToDialog.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Infrastructure.FileSystem; -namespace MoMoney.Presentation.Views.dialogs +namespace MoMoney.Presentation.Views { public interface ISelectFileToSaveToDialog { diff --git a/product/Presentation/Views/IShell.cs b/product/Presentation/Views/IShell.cs index bb01b50..96e2565 100644 --- a/product/Presentation/Views/IShell.cs +++ b/product/Presentation/Views/IShell.cs @@ -1,8 +1,6 @@ using System.ComponentModel; using System.Windows.Forms; -using MoMoney.Presentation.Presenters.Shell; -using MoMoney.Presentation.Views.Core; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Presenters; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/ISplashScreenView.cs b/product/Presentation/Views/ISplashScreenView.cs index 8a7d46f..1ab8b79 100644 --- a/product/Presentation/Views/ISplashScreenView.cs +++ b/product/Presentation/Views/ISplashScreenView.cs @@ -1,4 +1,4 @@ -namespace MoMoney.Presentation.Views.Startup +namespace MoMoney.Presentation.Views { public interface ISplashScreenView { diff --git a/product/Presentation/Views/IStatusBarView.cs b/product/Presentation/Views/IStatusBarView.cs index a1ad644..464ba27 100644 --- a/product/Presentation/Views/IStatusBarView.cs +++ b/product/Presentation/Views/IStatusBarView.cs @@ -1,5 +1,5 @@ -using Gorilla.Commons.Infrastructure.Threading; using MoMoney.Presentation.Winforms.Resources; +using MoMoney.Service.Infrastructure.Threading; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/ITaskTrayMessageView.cs b/product/Presentation/Views/ITaskTrayMessageView.cs index 00a3894..7d79e5f 100644 --- a/product/Presentation/Views/ITaskTrayMessageView.cs +++ b/product/Presentation/Views/ITaskTrayMessageView.cs @@ -1,4 +1,4 @@ -namespace MoMoney.Presentation.Views.Shell +namespace MoMoney.Presentation.Views { public interface ITaskTrayMessageView { diff --git a/product/Presentation/Views/IUnhandledErrorView.cs b/product/Presentation/Views/IUnhandledErrorView.cs index 0d4733a..76eb37f 100644 --- a/product/Presentation/Views/IUnhandledErrorView.cs +++ b/product/Presentation/Views/IUnhandledErrorView.cs @@ -1,8 +1,7 @@ using System; -using MoMoney.Presentation.Presenters.Shell; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; -namespace MoMoney.Presentation.Views.Shell +namespace MoMoney.Presentation.Views { public interface IUnhandledErrorView : IView<IUnhandledErrorPresenter> { diff --git a/product/Presentation/Views/IView.cs b/product/Presentation/Views/IView.cs index 521d8aa..c063c40 100644 --- a/product/Presentation/Views/IView.cs +++ b/product/Presentation/Views/IView.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel; using MoMoney.Presentation.Core; -namespace MoMoney.Presentation.Views.Core +namespace MoMoney.Presentation.Views { public interface IView : IWindowEvents, ISynchronizeInvoke, IDisposable { diff --git a/product/Presentation/Views/IViewAllBills.cs b/product/Presentation/Views/IViewAllBills.cs index 02f6d0f..60a59b0 100644 --- a/product/Presentation/Views/IViewAllBills.cs +++ b/product/Presentation/Views/IViewAllBills.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.billing; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/IViewIncomeHistory.cs b/product/Presentation/Views/IViewIncomeHistory.cs index 3490725..4379f9e 100644 --- a/product/Presentation/Views/IViewIncomeHistory.cs +++ b/product/Presentation/Views/IViewIncomeHistory.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Gorilla.Commons.Utility.Core; using MoMoney.DTO; using MoMoney.Presentation.Presenters; -using MoMoney.Presentation.Views.Core; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Views/IWindowEvents.cs b/product/Presentation/Views/IWindowEvents.cs index c5a173d..d939a54 100644 --- a/product/Presentation/Views/IWindowEvents.cs +++ b/product/Presentation/Views/IWindowEvents.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel; -using MoMoney.Presentation.Views.Core; namespace MoMoney.Presentation.Views { diff --git a/product/Presentation/Winforms/Databinding/DateTimePropertyBindingSpecs.cs b/product/Presentation/Winforms/Databinding/DateTimePropertyBindingSpecs.cs index d171c2f..a049d6c 100644 --- a/product/Presentation/Winforms/Databinding/DateTimePropertyBindingSpecs.cs +++ b/product/Presentation/Winforms/Databinding/DateTimePropertyBindingSpecs.cs @@ -9,7 +9,7 @@ namespace MoMoney.Presentation.Winforms.Databinding public class when_a_new_date_is_selected_by_a_date_time_picker_that_is_bound_to_a_property : concerns { it should_update_the_value_of_the_property = - () => Assertions.should_be_equal_to(thing_to_bind_to.birth_day, november_nineteenth); + () => thing_to_bind_to.birth_day.should_be_equal_to(november_nineteenth); context c = () => { diff --git a/product/Presentation/Winforms/Helpers/BindableTextBoxExtensionsSpecs.cs b/product/Presentation/Winforms/Helpers/BindableTextBoxExtensionsSpecs.cs index d2767f2..7676d0f 100644 --- a/product/Presentation/Winforms/Helpers/BindableTextBoxExtensionsSpecs.cs +++ b/product/Presentation/Winforms/Helpers/BindableTextBoxExtensionsSpecs.cs @@ -12,7 +12,7 @@ namespace MoMoney.Presentation.Winforms.Helpers [Concern(typeof (BindableTextBoxExtensions))] public class when_binding_a_text_control_to_a_command : concerns { - it should_run_each_command_when_the_text_changes_in_the_text_control = () => command.was_told_to<ITextBoxCommand<string>>(x => x.run(result)); + it should_run_each_command_when_the_text_changes_in_the_text_control = () => command.was_told_to(x => x.run(result)); context c = () => { diff --git a/product/Presentation/Winforms/Helpers/BindableTextBoxSpecs.cs b/product/Presentation/Winforms/Helpers/BindableTextBoxSpecs.cs index 2904ea4..c775326 100644 --- a/product/Presentation/Winforms/Helpers/BindableTextBoxSpecs.cs +++ b/product/Presentation/Winforms/Helpers/BindableTextBoxSpecs.cs @@ -1,7 +1,6 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; -using Gorilla.Commons.Utility.Extensions; namespace MoMoney.Presentation.Winforms.Helpers { diff --git a/product/Presentation/Winforms/Helpers/EventTriggerSpecs.cs b/product/Presentation/Winforms/Helpers/EventTriggerSpecs.cs index 4af6b74..62b50e0 100644 --- a/product/Presentation/Winforms/Helpers/EventTriggerSpecs.cs +++ b/product/Presentation/Winforms/Helpers/EventTriggerSpecs.cs @@ -11,8 +11,8 @@ namespace MoMoney.Presentation.Winforms.Helpers it should_correctly_call_that_method = () => { - Assertions.should_be_true(control.called_on_key_press); - Assertions.should_be_false(control.called_on_enter); + control.called_on_key_press.should_be_true(); + control.called_on_enter.should_be_false(); }; context c = () => { control = new TestControl(); }; diff --git a/product/Presentation/Winforms/Views/AboutTheApplicationView.cs b/product/Presentation/Winforms/Views/AboutTheApplicationView.cs index 62e3a29..7299b16 100644 --- a/product/Presentation/Winforms/Views/AboutTheApplicationView.cs +++ b/product/Presentation/Winforms/Views/AboutTheApplicationView.cs @@ -1,7 +1,7 @@ using System; using System.Reflection; using Gorilla.Commons.Utility.Extensions; -using MoMoney.Presentation.Views.Menu; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/AddBillPaymentView.cs b/product/Presentation/Winforms/Views/AddBillPaymentView.cs index ad6b346..9fe50e1 100644 --- a/product/Presentation/Winforms/Views/AddBillPaymentView.cs +++ b/product/Presentation/Winforms/Views/AddBillPaymentView.cs @@ -2,9 +2,8 @@ using System; using System.Collections.Generic; using Gorilla.Commons.Utility.Extensions; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.billing; -using MoMoney.Presentation.Views.billing; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Presenters; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Helpers; using MoMoney.Presentation.Winforms.Krypton; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Presentation/Winforms/Views/AddCompanyView.cs b/product/Presentation/Winforms/Views/AddCompanyView.cs index 22150de..fe23f1b 100644 --- a/product/Presentation/Winforms/Views/AddCompanyView.cs +++ b/product/Presentation/Winforms/Views/AddCompanyView.cs @@ -6,7 +6,6 @@ using Gorilla.Commons.Utility.Extensions; using MoMoney.DTO; using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Core; using MoMoney.Presentation.Winforms.Databinding; using MoMoney.Presentation.Winforms.Resources; @@ -35,7 +34,7 @@ namespace MoMoney.Presentation.Winforms.Views public void attach_to(IAddCompanyPresenter presenter) { - Create.bind_to(ux_company_name, dto, x => x.company_name); + ux_company_name.bind_to(dto, x => x.company_name); submit_button = x => presenter.submit(dto); } diff --git a/product/Presentation/Winforms/Views/AddNewIncomeView.cs b/product/Presentation/Winforms/Views/AddNewIncomeView.cs index 7a1eec1..ec5fa65 100644 --- a/product/Presentation/Winforms/Views/AddNewIncomeView.cs +++ b/product/Presentation/Winforms/Views/AddNewIncomeView.cs @@ -4,7 +4,6 @@ using Gorilla.Commons.Utility.Extensions; using MoMoney.DTO; using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Core; using MoMoney.Presentation.Winforms.Helpers; using MoMoney.Presentation.Winforms.Krypton; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Presentation/Winforms/Views/ApplicationDockedWindow.cs b/product/Presentation/Winforms/Views/ApplicationDockedWindow.cs index de56f4b..331d77a 100644 --- a/product/Presentation/Winforms/Views/ApplicationDockedWindow.cs +++ b/product/Presentation/Winforms/Views/ApplicationDockedWindow.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Windows.Forms; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Core; using MoMoney.Presentation.Winforms.Helpers; using MoMoney.Presentation.Winforms.Resources; using WeifenLuo.WinFormsUI.Docking; diff --git a/product/Presentation/Winforms/Views/ApplicationShell.cs b/product/Presentation/Winforms/Views/ApplicationShell.cs index d106a70..26b6cf6 100644 --- a/product/Presentation/Winforms/Views/ApplicationShell.cs +++ b/product/Presentation/Winforms/Views/ApplicationShell.cs @@ -1,12 +1,11 @@ -using System; +using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.Composition; using System.Windows.Forms; using Gorilla.Commons.Utility.Extensions; -using MoMoney.Presentation.Presenters.Shell; +using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Core; using MoMoney.Presentation.Winforms.Helpers; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/ApplicationShellSpecs.cs b/product/Presentation/Winforms/Views/ApplicationShellSpecs.cs index e108299..bb47b40 100644 --- a/product/Presentation/Winforms/Views/ApplicationShellSpecs.cs +++ b/product/Presentation/Winforms/Views/ApplicationShellSpecs.cs @@ -1,7 +1,7 @@ using System; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Presentation.Presenters.Shell; +using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Helpers; diff --git a/product/Presentation/Winforms/Views/ApplicationWindow.cs b/product/Presentation/Winforms/Views/ApplicationWindow.cs index bbeebd8..8be533a 100644 --- a/product/Presentation/Winforms/Views/ApplicationWindow.cs +++ b/product/Presentation/Winforms/Views/ApplicationWindow.cs @@ -1,8 +1,7 @@ using System; using System.ComponentModel; using System.Windows.Forms; -using MoMoney.Presentation.Views.core; -using MoMoney.Presentation.Views.Core; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Helpers; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Presentation/Winforms/Views/CheckForUpdatesView.cs b/product/Presentation/Winforms/Views/CheckForUpdatesView.cs index 9adc9b1..a61b34b 100644 --- a/product/Presentation/Winforms/Views/CheckForUpdatesView.cs +++ b/product/Presentation/Winforms/Views/CheckForUpdatesView.cs @@ -3,10 +3,8 @@ using System.Reflection; using System.Windows.Forms; using Gorilla.Commons.Utility; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.updates; +using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Core; -using MoMoney.Presentation.Views.updates; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/LogFileView.cs b/product/Presentation/Winforms/Views/LogFileView.cs index e057408..9396485 100644 --- a/product/Presentation/Winforms/Views/LogFileView.cs +++ b/product/Presentation/Winforms/Views/LogFileView.cs @@ -1,4 +1,4 @@ -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/MainMenuView.cs b/product/Presentation/Winforms/Views/MainMenuView.cs index 53bf94e..0d73534 100644 --- a/product/Presentation/Winforms/Views/MainMenuView.cs +++ b/product/Presentation/Winforms/Views/MainMenuView.cs @@ -1,4 +1,4 @@ -using MoMoney.Presentation.Presenters.Navigation; +using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Helpers; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Presentation/Winforms/Views/NavigationView.cs b/product/Presentation/Winforms/Views/NavigationView.cs index d68965a..0904e25 100644 --- a/product/Presentation/Winforms/Views/NavigationView.cs +++ b/product/Presentation/Winforms/Views/NavigationView.cs @@ -2,7 +2,6 @@ using System.Windows.Forms; using Gorilla.Commons.Utility.Extensions; using MoMoney.Presentation.Model.Navigation; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Navigation; using MoMoney.Presentation.Winforms.Resources; using WeifenLuo.WinFormsUI.Docking; diff --git a/product/Presentation/Winforms/Views/NotificationIconView.cs b/product/Presentation/Winforms/Views/NotificationIconView.cs index 3d087d9..2a41be7 100644 --- a/product/Presentation/Winforms/Views/NotificationIconView.cs +++ b/product/Presentation/Winforms/Views/NotificationIconView.cs @@ -4,7 +4,7 @@ using MoMoney.Presentation.Model.Menu; using MoMoney.Presentation.Model.Menu.File; using MoMoney.Presentation.Model.Menu.Help; using MoMoney.Presentation.Model.Menu.window; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; using MenuItem=System.Windows.Forms.MenuItem; diff --git a/product/Presentation/Winforms/Views/SaveChangesView.cs b/product/Presentation/Winforms/Views/SaveChangesView.cs index ecb3c7c..070d6f9 100644 --- a/product/Presentation/Winforms/Views/SaveChangesView.cs +++ b/product/Presentation/Winforms/Views/SaveChangesView.cs @@ -1,9 +1,8 @@ using System; using System.ComponentModel; using System.Windows.Forms; -using MoMoney.Presentation.Model.Menu.File.Commands; -using MoMoney.Presentation.Views.Core; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Model.Menu.File; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/SaveChangesViewSpecs.cs b/product/Presentation/Winforms/Views/SaveChangesViewSpecs.cs index bc3c542..ecf1e9d 100644 --- a/product/Presentation/Winforms/Views/SaveChangesViewSpecs.cs +++ b/product/Presentation/Winforms/Views/SaveChangesViewSpecs.cs @@ -1,7 +1,7 @@ using System; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Presentation.Model.Menu.File.Commands; +using MoMoney.Presentation.Model.Menu.File; using MoMoney.Presentation.Winforms.Helpers; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/SelectFileToOpenDialog.cs b/product/Presentation/Winforms/Views/SelectFileToOpenDialog.cs index 06d4065..b01e23f 100644 --- a/product/Presentation/Winforms/Views/SelectFileToOpenDialog.cs +++ b/product/Presentation/Winforms/Views/SelectFileToOpenDialog.cs @@ -1,6 +1,6 @@ using System.Windows.Forms; using Gorilla.Commons.Infrastructure.FileSystem; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; namespace MoMoney.Presentation.Winforms.Views { diff --git a/product/Presentation/Winforms/Views/SelectFileToSaveToDialog.cs b/product/Presentation/Winforms/Views/SelectFileToSaveToDialog.cs index 95e3710..78e3b8a 100644 --- a/product/Presentation/Winforms/Views/SelectFileToSaveToDialog.cs +++ b/product/Presentation/Winforms/Views/SelectFileToSaveToDialog.cs @@ -1,6 +1,6 @@ using System.Windows.Forms; using Gorilla.Commons.Infrastructure.FileSystem; -using MoMoney.Presentation.Views.dialogs; +using MoMoney.Presentation.Views; namespace MoMoney.Presentation.Winforms.Views { diff --git a/product/Presentation/Winforms/Views/SplashScreenView.cs b/product/Presentation/Winforms/Views/SplashScreenView.cs index 2c64037..3f7b90e 100644 --- a/product/Presentation/Winforms/Views/SplashScreenView.cs +++ b/product/Presentation/Winforms/Views/SplashScreenView.cs @@ -1,6 +1,6 @@ using System; using System.Windows.Forms; -using MoMoney.Presentation.Views.Startup; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/StatusBarView.cs b/product/Presentation/Winforms/Views/StatusBarView.cs index 5c2973d..af272cf 100644 --- a/product/Presentation/Winforms/Views/StatusBarView.cs +++ b/product/Presentation/Winforms/Views/StatusBarView.cs @@ -1,6 +1,5 @@ using System.Windows.Forms; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Shell; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/TaskTrayMessage.cs b/product/Presentation/Winforms/Views/TaskTrayMessage.cs index e73e2f2..1360bd2 100644 --- a/product/Presentation/Winforms/Views/TaskTrayMessage.cs +++ b/product/Presentation/Winforms/Views/TaskTrayMessage.cs @@ -1,5 +1,5 @@ using Gorilla.Commons.Utility.Extensions; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Views; namespace MoMoney.Presentation.Winforms.Views { diff --git a/product/Presentation/Winforms/Views/TitleBar.cs b/product/Presentation/Winforms/Views/TitleBar.cs index d485020..6cc54b3 100644 --- a/product/Presentation/Winforms/Views/TitleBar.cs +++ b/product/Presentation/Winforms/Views/TitleBar.cs @@ -1,6 +1,5 @@ using System.Windows.Forms; using MoMoney.Presentation.Views; -using MoMoney.Presentation.Views.Shell; namespace MoMoney.Presentation.Winforms.Views { diff --git a/product/Presentation/Winforms/Views/UnhandledErrorView.cs b/product/Presentation/Winforms/Views/UnhandledErrorView.cs index 3f92f97..43fc532 100644 --- a/product/Presentation/Winforms/Views/UnhandledErrorView.cs +++ b/product/Presentation/Winforms/Views/UnhandledErrorView.cs @@ -1,8 +1,7 @@ -using System; +using System; using System.Windows.Forms; -using MoMoney.Presentation.Presenters.Shell; -using MoMoney.Presentation.Views.Core; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Presenters; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; namespace MoMoney.Presentation.Winforms.Views diff --git a/product/Presentation/Winforms/Views/ViewAllBills.cs b/product/Presentation/Winforms/Views/ViewAllBills.cs index 4ed0c38..5043f97 100644 --- a/product/Presentation/Winforms/Views/ViewAllBills.cs +++ b/product/Presentation/Winforms/Views/ViewAllBills.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; using MoMoney.DTO; -using MoMoney.Presentation.Presenters.billing; +using MoMoney.Presentation.Presenters; using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Presentation/Winforms/Views/WelcomeScreen.cs b/product/Presentation/Winforms/Views/WelcomeScreen.cs index 2e2deb6..5217f4f 100644 --- a/product/Presentation/Winforms/Views/WelcomeScreen.cs +++ b/product/Presentation/Winforms/Views/WelcomeScreen.cs @@ -1,6 +1,6 @@ -using MoMoney.Presentation.Model.Menu.File.Commands; -using MoMoney.Presentation.Presenters.Shell; -using MoMoney.Presentation.Views.Shell; +using MoMoney.Presentation.Model.Menu.File; +using MoMoney.Presentation.Presenters; +using MoMoney.Presentation.Views; using MoMoney.Presentation.Winforms.Helpers; using MoMoney.Presentation.Winforms.Resources; diff --git a/product/Service.Contracts/Infrastructure/Logging/ILogFileTasks.cs b/product/Service.Contracts/Infrastructure/Logging/ILogFileTasks.cs index 9b31302..ddec475 100644 --- a/product/Service.Contracts/Infrastructure/Logging/ILogFileTasks.cs +++ b/product/Service.Contracts/Infrastructure/Logging/ILogFileTasks.cs @@ -1,4 +1,4 @@ -namespace MoMoney.Service.Infrastructure.Logging +namespace MoMoney.Service.Contracts.Infrastructure.Logging { public interface ILogFileTasks { diff --git a/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWork.cs b/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWork.cs index 5665500..494bc1a 100644 --- a/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWork.cs +++ b/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWork.cs @@ -1,6 +1,6 @@ using System; -namespace MoMoney.Service.Infrastructure.Transactions +namespace MoMoney.Service.Contracts.Infrastructure.Transactions { public interface IUnitOfWork : IDisposable { diff --git a/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWorkFactory.cs b/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWorkFactory.cs index 0d97646..542d394 100644 --- a/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWorkFactory.cs +++ b/product/Service.Contracts/Infrastructure/Transactions/IUnitOfWorkFactory.cs @@ -1,5 +1,4 @@ using Gorilla.Commons.Utility.Core; -using MoMoney.Service.Infrastructure.Transactions; namespace MoMoney.Service.Contracts.Infrastructure.Transactions { diff --git a/product/Service.Contracts/Infrastructure/Updating/ICancelUpdate.cs b/product/Service.Contracts/Infrastructure/Updating/ICancelUpdate.cs index ee987d9..80bf7d8 100644 --- a/product/Service.Contracts/Infrastructure/Updating/ICancelUpdate.cs +++ b/product/Service.Contracts/Infrastructure/Updating/ICancelUpdate.cs @@ -1,6 +1,6 @@ using Gorilla.Commons.Utility.Core; -namespace MoMoney.Tasks.infrastructure.updating +namespace MoMoney.Service.Contracts.Infrastructure.Updating { public interface ICancelUpdate : ICommand { diff --git a/product/Service.Contracts/Infrastructure/Updating/IDownloadTheLatestVersion.cs b/product/Service.Contracts/Infrastructure/Updating/IDownloadTheLatestVersion.cs index 29848a1..2efa1ac 100644 --- a/product/Service.Contracts/Infrastructure/Updating/IDownloadTheLatestVersion.cs +++ b/product/Service.Contracts/Infrastructure/Updating/IDownloadTheLatestVersion.cs @@ -1,7 +1,7 @@ using Gorilla.Commons.Utility; using Gorilla.Commons.Utility.Core; -namespace MoMoney.Service.Infrastructure.Updating +namespace MoMoney.Service.Contracts.Infrastructure.Updating { public interface IDownloadTheLatestVersion : ICallbackCommand<Percent> { diff --git a/product/Service.Contracts/Properties/AssemblyInfo.cs b/product/Service.Contracts/Properties/AssemblyInfo.cs index 679a60a..757ea23 100644 --- a/product/Service.Contracts/Properties/AssemblyInfo.cs +++ b/product/Service.Contracts/Properties/AssemblyInfo.cs @@ -1,5 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/product/Service/Application/GetAllCompanysQuery.cs b/product/Service/Application/GetAllCompanysQuery.cs index fb23e52..847ec0c 100644 --- a/product/Service/Application/GetAllCompanysQuery.cs +++ b/product/Service/Application/GetAllCompanysQuery.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.ComponentModel; using Gorilla.Commons.Utility.Core; using Gorilla.Commons.Utility.Extensions; using MoMoney.Domain.Accounting; @@ -8,6 +9,7 @@ using MoMoney.Service.Contracts.Application; namespace MoMoney.Service.Application { + [DisplayName("Loading all companies...")] public class GetAllCompanysQuery : IGetAllCompanysQuery { readonly ICompanyRepository companys; diff --git a/product/Service/Infrastructure/Eventing/EventAggregatorSpecs.cs b/product/Service/Infrastructure/Eventing/EventAggregatorSpecs.cs index 0364011..9a8166a 100644 --- a/product/Service/Infrastructure/Eventing/EventAggregatorSpecs.cs +++ b/product/Service/Infrastructure/Eventing/EventAggregatorSpecs.cs @@ -19,7 +19,7 @@ namespace MoMoney.Service.Infrastructure.Eventing { it should_notify_all_subscribers_of_the_event = () => { - first_subscriber.was_told_to<IEventSubscriber<TestEvent>>(x => x.notify(message)); + first_subscriber.was_told_to(x => x.notify(message)); second_subscriber.was_told_to(x => x.notify(message)); }; diff --git a/product/Service/Infrastructure/Logging/LogFileTasks.cs b/product/Service/Infrastructure/Logging/LogFileTasks.cs index 8e85047..645a3e8 100644 --- a/product/Service/Infrastructure/Logging/LogFileTasks.cs +++ b/product/Service/Infrastructure/Logging/LogFileTasks.cs @@ -1,5 +1,6 @@ using System.IO; using Gorilla.Commons.Infrastructure.Reflection; +using MoMoney.Service.Contracts.Infrastructure.Logging; namespace MoMoney.Service.Infrastructure.Logging { diff --git a/product/Service/Infrastructure/Security/IsInRoleSpecs.cs b/product/Service/Infrastructure/Security/IsInRoleSpecs.cs index 3eabb73..06ffe89 100644 --- a/product/Service/Infrastructure/Security/IsInRoleSpecs.cs +++ b/product/Service/Infrastructure/Security/IsInRoleSpecs.cs @@ -2,55 +2,62 @@ using System.Security.Principal; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; -using MoMoney.Service.Infrastructure.Security; -public class IsInRoleSpecs +namespace MoMoney.Service.Infrastructure.Security { -} - -public class when_checking_if_a_principal_belongs_to_a_role : - concerns_for<ISpecification<IPrincipal>, IsInRole> -{ - static protected readonly Role administrator_role = new Role("administrators"); - - public override ISpecification<IPrincipal> create_sut() + public class IsInRoleSpecs { - return new IsInRole(administrator_role); + public class when_checking_if_a_principal_belongs_to_a_role : + concerns_for<ISpecification<IPrincipal>, IsInRole> + { + static protected readonly Role administrator_role = new Role("administrators"); + + public override ISpecification<IPrincipal> create_sut() + { + return new IsInRole(administrator_role); + } + } + + public class when_not_in_one_of_the_roles : when_checking_if_a_principal_belongs_to_a_role + { + context c = () => + { + principal = the_dependency<IPrincipal>(); + when_the(principal) + .is_told_to(x => x.IsInRole(administrator_role)) + .it_will_return(false); + }; + + because b = () => + { + result = sut.is_satisfied_by(principal); + }; + + it should_return_false = () => result.should_be_false(); + + static bool result; + static IPrincipal principal; + } + + public class when_in_one_of_the_roles : when_checking_if_a_principal_belongs_to_a_role + { + context c = () => + { + principal = the_dependency<IPrincipal>(); + when_the(principal) + .is_told_to(x => x.IsInRole(administrator_role)) + .it_will_return(true); + }; + + because b = () => + { + result = sut.is_satisfied_by(principal); + }; + + it should_return_true = () => result.should_be_true(); + + static bool result; + static IPrincipal principal; + } } -} - -public class when_not_in_one_of_the_roles : when_checking_if_a_principal_belongs_to_a_role -{ - context c = () => - { - principal = the_dependency<IPrincipal>(); - when_the(principal) - .is_told_to(x => x.IsInRole(administrator_role)) - .it_will_return(false); - }; - - because b = () => { result = sut.is_satisfied_by(principal); }; - - it should_return_false = () => result.should_be_false(); - - static bool result; - static IPrincipal principal; -} - -public class when_in_one_of_the_roles : when_checking_if_a_principal_belongs_to_a_role -{ - context c = () => - { - principal = the_dependency<IPrincipal>(); - when_the(principal) - .is_told_to(x => x.IsInRole(administrator_role)) - .it_will_return(true); - }; - - because b = () => { result = sut.is_satisfied_by(principal); }; - - it should_return_true = () => result.should_be_true(); - - static bool result; - static IPrincipal principal; }
\ No newline at end of file diff --git a/product/Service/Infrastructure/Threading/BackgroundThread.cs b/product/Service/Infrastructure/Threading/BackgroundThread.cs index 32dcc40..21e9645 100644 --- a/product/Service/Infrastructure/Threading/BackgroundThread.cs +++ b/product/Service/Infrastructure/Threading/BackgroundThread.cs @@ -1,6 +1,6 @@ using MoMoney.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface IBackgroundThread : IDisposableCommand { diff --git a/product/Service/Infrastructure/Threading/BackgroundThreadFactory.cs b/product/Service/Infrastructure/Threading/BackgroundThreadFactory.cs index 7fd0bd7..39b06b7 100644 --- a/product/Service/Infrastructure/Threading/BackgroundThreadFactory.cs +++ b/product/Service/Infrastructure/Threading/BackgroundThreadFactory.cs @@ -3,7 +3,7 @@ using Gorilla.Commons.Infrastructure.Container; using Gorilla.Commons.Utility.Core; using MoMoney.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface IBackgroundThreadFactory { diff --git a/product/Service/Infrastructure/Threading/BackgroundThreadFactorySpecs.cs b/product/Service/Infrastructure/Threading/BackgroundThreadFactorySpecs.cs index d1d3c47..00daa8c 100644 --- a/product/Service/Infrastructure/Threading/BackgroundThreadFactorySpecs.cs +++ b/product/Service/Infrastructure/Threading/BackgroundThreadFactorySpecs.cs @@ -3,7 +3,7 @@ using Gorilla.Commons.Infrastructure.Container; using Gorilla.Commons.Testing; using MoMoney.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [Concern(typeof (BackgroundThreadFactory))] public abstract class behaves_like_a_background_thread_factory : concerns_for<IBackgroundThreadFactory, BackgroundThreadFactory> diff --git a/product/Service/Infrastructure/Threading/BackgroundThreadSpecs.cs b/product/Service/Infrastructure/Threading/BackgroundThreadSpecs.cs index c5ee665..694445a 100644 --- a/product/Service/Infrastructure/Threading/BackgroundThreadSpecs.cs +++ b/product/Service/Infrastructure/Threading/BackgroundThreadSpecs.cs @@ -3,16 +3,16 @@ using Gorilla.Commons.Testing; using MoMoney.Utility.Core; using Rhino.Mocks; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [Concern(typeof (BackgroundThread))] public abstract class behaves_like_a_background_thread : concerns_for<IBackgroundThread, BackgroundThread> { context c = () => - { - command_to_execute = the_dependency<IDisposableCommand>(); - worker_thread = the_dependency<IWorkerThread>(); - }; + { + command_to_execute = the_dependency<IDisposableCommand>(); + worker_thread = the_dependency<IWorkerThread>(); + }; protected static IDisposableCommand command_to_execute; protected static IWorkerThread worker_thread; @@ -26,10 +26,10 @@ namespace Gorilla.Commons.Infrastructure.Threading it should_start_the_worker_thread_asynchronously = () => worker_thread.was_told_to(t => t.begin()); because b = () => - { - sut.run(); - worker_thread.Raise(t => t.DoWork += null, null, null); - }; + { + sut.run(); + worker_thread.Raise(t => t.DoWork += null, null, null); + }; } [Concern(typeof (BackgroundThread))] diff --git a/product/Service/Infrastructure/Threading/CommandProcessorSpecs.cs b/product/Service/Infrastructure/Threading/CommandProcessorSpecs.cs index d519f1d..3a616de 100644 --- a/product/Service/Infrastructure/Threading/CommandProcessorSpecs.cs +++ b/product/Service/Infrastructure/Threading/CommandProcessorSpecs.cs @@ -1,9 +1,8 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; using Gorilla.Commons.Utility.Core; -using MoMoney.Service.Infrastructure.Threading; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [Concern(typeof (CommandProcessor))] public abstract class behaves_like_a_command_processor : concerns_for<ICommandProcessor, CommandProcessor> @@ -18,17 +17,17 @@ namespace Gorilla.Commons.Infrastructure.Threading it should_run_the_second_command_in_the_queue = () => second_command.was_told_to(f => f.run()); context c = () => - { - first_command = an<ICommand>(); - second_command = an<ICommand>(); - }; + { + first_command = an<ICommand>(); + second_command = an<ICommand>(); + }; because b = () => - { - sut.add(first_command); - sut.add(second_command); - sut.run(); - }; + { + sut.add(first_command); + sut.add(second_command); + sut.run(); + }; static ICommand first_command; static ICommand second_command; @@ -43,11 +42,11 @@ namespace Gorilla.Commons.Infrastructure.Threading context c = () => { first_command = an<ICommand>(); }; because b = () => - { - sut.add(first_command); - sut.run(); - sut.run(); - }; + { + sut.add(first_command); + sut.run(); + sut.run(); + }; static ICommand first_command; } diff --git a/product/Service/Infrastructure/Threading/ITimerClient.cs b/product/Service/Infrastructure/Threading/ITimerClient.cs index f8314c1..b6ff3f5 100644 --- a/product/Service/Infrastructure/Threading/ITimerClient.cs +++ b/product/Service/Infrastructure/Threading/ITimerClient.cs @@ -1,4 +1,4 @@ -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface ITimerClient { diff --git a/product/Service/Infrastructure/Threading/IWorkerThread.cs b/product/Service/Infrastructure/Threading/IWorkerThread.cs index ebdaf38..2d1cf26 100644 --- a/product/Service/Infrastructure/Threading/IWorkerThread.cs +++ b/product/Service/Infrastructure/Threading/IWorkerThread.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface IWorkerThread : IDisposable { diff --git a/product/Service/Infrastructure/Threading/IntervalTimer.cs b/product/Service/Infrastructure/Threading/IntervalTimer.cs index 739fc3a..7537a1c 100644 --- a/product/Service/Infrastructure/Threading/IntervalTimer.cs +++ b/product/Service/Infrastructure/Threading/IntervalTimer.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Timers; -using Gorilla.Commons.Infrastructure.Threading; namespace MoMoney.Service.Infrastructure.Threading { diff --git a/product/Service/Infrastructure/Threading/IntervalTimerSpecs.cs b/product/Service/Infrastructure/Threading/IntervalTimerSpecs.cs index 1a4e4c9..887ca55 100644 --- a/product/Service/Infrastructure/Threading/IntervalTimerSpecs.cs +++ b/product/Service/Infrastructure/Threading/IntervalTimerSpecs.cs @@ -2,10 +2,9 @@ using System; using System.Timers; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Service.Infrastructure.Threading; using Rhino.Mocks; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [Concern(typeof (IntervalTimer))] public abstract class behaves_like_an_interval_timer : concerns_for<ITimer, IntervalTimer> @@ -26,12 +25,12 @@ namespace Gorilla.Commons.Infrastructure.Threading it should_start_the_timer = () => timer.was_told_to(t => t.Start()); context c = () => - { - client = an<ITimerClient>(); - timer = dependency<Timer>(); + { + client = an<ITimerClient>(); + timer = dependency<Timer>(); - factory.is_told_to(f => f.create_for(new TimeSpan(0, 10, 0))).it_will_return(timer); - }; + factory.is_told_to(f => f.create_for(new TimeSpan(0, 10, 0))).it_will_return(timer); + }; because b = () => sut.start_notifying(client, new TimeSpan(0, 10, 0)); } @@ -40,28 +39,28 @@ namespace Gorilla.Commons.Infrastructure.Threading public class when_starting_a_timer_for_an_existing_client : behaves_like_an_interval_timer { it should_stop_the_previously_started_timer = () => - { - first_timer.was_told_to(t => t.Stop()); - first_timer.was_told_to(t => t.Dispose()); - }; + { + first_timer.was_told_to(t => t.Stop()); + first_timer.was_told_to(t => t.Dispose()); + }; it should_start_a_new_timer = () => second_timer.was_told_to(t => t.Start()); context c = () => - { - client = an<ITimerClient>(); - first_timer = dependency<Timer>(); - second_timer = dependency<Timer>(); + { + client = an<ITimerClient>(); + first_timer = dependency<Timer>(); + second_timer = dependency<Timer>(); - factory.is_told_to(f => f.create_for(new TimeSpan(0, 1, 1))).it_will_return(first_timer); - factory.is_told_to(f => f.create_for(new TimeSpan(0, 2, 2))).it_will_return(second_timer); - }; + factory.is_told_to(f => f.create_for(new TimeSpan(0, 1, 1))).it_will_return(first_timer); + factory.is_told_to(f => f.create_for(new TimeSpan(0, 2, 2))).it_will_return(second_timer); + }; because b = () => - { - sut.start_notifying(client, new TimeSpan(0, 1, 1)); - sut.start_notifying(client, new TimeSpan(0, 2, 2)); - }; + { + sut.start_notifying(client, new TimeSpan(0, 1, 1)); + sut.start_notifying(client, new TimeSpan(0, 2, 2)); + }; static ITimerClient client; static Timer first_timer; @@ -77,17 +76,17 @@ namespace Gorilla.Commons.Infrastructure.Threading static Timer timer; context c = () => - { - client = an<ITimerClient>(); - timer = dependency<Timer>(); - factory.is_told_to(f => f.create_for(Arg<TimeSpan>.Is.Anything)).it_will_return(timer); - }; + { + client = an<ITimerClient>(); + timer = dependency<Timer>(); + factory.is_told_to(f => f.create_for(Arg<TimeSpan>.Is.Anything)).it_will_return(timer); + }; because b = () => - { - sut.start_notifying(client, new TimeSpan(0, 10, 0)); - timer.Raise(t => t.Elapsed += null, timer, null); - }; + { + sut.start_notifying(client, new TimeSpan(0, 10, 0)); + timer.Raise(t => t.Elapsed += null, timer, null); + }; } [Concern(typeof (IntervalTimer))] @@ -101,19 +100,19 @@ namespace Gorilla.Commons.Infrastructure.Threading it should_dispose_the_timer_that_was_started_for_the_client = () => timer.was_told_to(t => t.Dispose()); context c = () => - { - client = an<ITimerClient>(); - timer = dependency<Timer>(); + { + client = an<ITimerClient>(); + timer = dependency<Timer>(); - when_the(factory).is_told_to(t => t.create_for(Arg<TimeSpan>.Is.Anything)).it_will_return( - timer); - }; + when_the(factory).is_told_to(t => t.create_for(Arg<TimeSpan>.Is.Anything)).it_will_return( + timer); + }; because b = () => - { - sut.start_notifying(client, new TimeSpan(0, 0, 1)); - sut.stop_notifying(client); - }; + { + sut.start_notifying(client, new TimeSpan(0, 0, 1)); + sut.stop_notifying(client); + }; } [Concern(typeof (IntervalTimer))] diff --git a/product/Service/Infrastructure/Threading/RaiseEventInterceptor.cs b/product/Service/Infrastructure/Threading/RaiseEventInterceptor.cs index 80ae582..e96b40a 100644 --- a/product/Service/Infrastructure/Threading/RaiseEventInterceptor.cs +++ b/product/Service/Infrastructure/Threading/RaiseEventInterceptor.cs @@ -1,7 +1,7 @@ using Castle.Core.Interceptor; using MoMoney.Service.Infrastructure.Eventing; -namespace Gorilla.Commons.Infrastructure.Castle.DynamicProxy.Interceptors +namespace MoMoney.Service.Infrastructure.Threading { public interface IRaiseEventInterceptor<Event> : IInterceptor where Event : IEvent, new() { diff --git a/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptor.cs b/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptor.cs index 1eb481f..16fb7da 100644 --- a/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptor.cs +++ b/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptor.cs @@ -1,8 +1,7 @@ using Castle.Core.Interceptor; -using Gorilla.Commons.Infrastructure.Threading; using MoMoney.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Castle.DynamicProxy.Interceptors +namespace MoMoney.Service.Infrastructure.Threading { public class RunOnBackgroundThreadInterceptor<CommandToExecute> : IInterceptor where CommandToExecute : IDisposableCommand diff --git a/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptorSpecs.cs b/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptorSpecs.cs index bb863ac..ec58525 100644 --- a/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptorSpecs.cs +++ b/product/Service/Infrastructure/Threading/RunOnBackgroundThreadInterceptorSpecs.cs @@ -1,10 +1,9 @@ using Castle.Core.Interceptor; using developwithpassion.bdd.contexts; -using Gorilla.Commons.Infrastructure.Threading; using Gorilla.Commons.Testing; using MoMoney.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Castle.DynamicProxy.Interceptors +namespace MoMoney.Service.Infrastructure.Threading { [Concern(typeof (RunOnBackgroundThreadInterceptor<>))] public abstract class behaves_like_background_thread_interceptor : @@ -20,13 +19,13 @@ namespace Gorilla.Commons.Infrastructure.Castle.DynamicProxy.Interceptors behaves_like_background_thread_interceptor { context c = () => - { - invocation = an<IInvocation>(); - background_thread = an<IBackgroundThread>(); - thread_factory - .is_told_to(f => f.create_for<IDisposableCommand>()) - .it_will_return(background_thread); - }; + { + invocation = an<IInvocation>(); + background_thread = an<IBackgroundThread>(); + thread_factory + .is_told_to(f => f.create_for<IDisposableCommand>()) + .it_will_return(background_thread); + }; because b = () => sut.Intercept(invocation); diff --git a/product/Service/Infrastructure/Threading/RunOnUIThread.cs b/product/Service/Infrastructure/Threading/RunOnUIThread.cs index c649a84..1bf18de 100644 --- a/product/Service/Infrastructure/Threading/RunOnUIThread.cs +++ b/product/Service/Infrastructure/Threading/RunOnUIThread.cs @@ -1,8 +1,8 @@ using Castle.Core.Interceptor; -using Gorilla.Commons.Infrastructure.Threading; +using Gorilla.Commons.Infrastructure; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Castle.DynamicProxy.Interceptors +namespace MoMoney.Service.Infrastructure.Threading { public class RunOnUIThread : IInterceptor { diff --git a/product/Service/Infrastructure/Threading/SynchronizationContextFactory.cs b/product/Service/Infrastructure/Threading/SynchronizationContextFactory.cs index 69df886..6798267 100644 --- a/product/Service/Infrastructure/Threading/SynchronizationContextFactory.cs +++ b/product/Service/Infrastructure/Threading/SynchronizationContextFactory.cs @@ -2,7 +2,7 @@ using System.Threading; using Gorilla.Commons.Infrastructure.Container; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface ISynchronizationContextFactory : IFactory<ISynchronizationContext> { diff --git a/product/Service/Infrastructure/Threading/SynchronizedCommand.cs b/product/Service/Infrastructure/Threading/SynchronizedCommand.cs index 8fb8ea2..d5834b8 100644 --- a/product/Service/Infrastructure/Threading/SynchronizedCommand.cs +++ b/product/Service/Infrastructure/Threading/SynchronizedCommand.cs @@ -2,7 +2,7 @@ using System; using System.Threading; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface ISynchronizedCommand : IParameterizedCommand<Action>, IParameterizedCommand<ICommand> { diff --git a/product/Service/Infrastructure/Threading/SynchronizedContext.cs b/product/Service/Infrastructure/Threading/SynchronizedContext.cs index 72abc3b..258c9ea 100644 --- a/product/Service/Infrastructure/Threading/SynchronizedContext.cs +++ b/product/Service/Infrastructure/Threading/SynchronizedContext.cs @@ -1,7 +1,7 @@ using System.Threading; using Gorilla.Commons.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface ISynchronizationContext : IParameterizedCommand<ICommand> { diff --git a/product/Service/Infrastructure/Threading/Synchronizer.cs b/product/Service/Infrastructure/Threading/Synchronizer.cs index 48e2797..612d8ce 100644 --- a/product/Service/Infrastructure/Threading/Synchronizer.cs +++ b/product/Service/Infrastructure/Threading/Synchronizer.cs @@ -5,7 +5,7 @@ using System.Diagnostics; using System.Security.Permissions; using System.Threading; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [SecurityPermission(SecurityAction.Demand, ControlThread = true)] public class Synchronizer : ISynchronizeInvoke, IDisposable @@ -14,7 +14,7 @@ namespace Gorilla.Commons.Infrastructure.Threading public Synchronizer() { - worker_thread = new WorkerThread(this); + worker_thread = new WorkerThread(); } public bool InvokeRequired @@ -55,12 +55,10 @@ namespace Gorilla.Commons.Infrastructure.Threading bool end_loop; readonly Mutex end_loop_mutex; readonly AutoResetEvent item_added; - Synchronizer synchronizer; readonly Queue work_item_queue; - internal WorkerThread(Synchronizer synchronizer) + internal WorkerThread() { - this.synchronizer = synchronizer; end_loop = false; thread = null; end_loop_mutex = new Mutex(); @@ -88,7 +86,7 @@ namespace Gorilla.Commons.Infrastructure.Threading } get { - var result = false; + bool result; end_loop_mutex.WaitOne(); result = end_loop; end_loop_mutex.ReleaseMutex(); diff --git a/product/Service/Infrastructure/Threading/ThreadingExtensions.cs b/product/Service/Infrastructure/Threading/ThreadingExtensions.cs index 6928005..25b55ab 100644 --- a/product/Service/Infrastructure/Threading/ThreadingExtensions.cs +++ b/product/Service/Infrastructure/Threading/ThreadingExtensions.cs @@ -1,6 +1,6 @@ using MoMoney.Utility.Core; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public static class ThreadingExtensions { diff --git a/product/Service/Infrastructure/Threading/TimerFactory.cs b/product/Service/Infrastructure/Threading/TimerFactory.cs index 250be31..058c62e 100644 --- a/product/Service/Infrastructure/Threading/TimerFactory.cs +++ b/product/Service/Infrastructure/Threading/TimerFactory.cs @@ -1,7 +1,7 @@ using System; using System.Timers; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public interface ITimerFactory { diff --git a/product/Service/Infrastructure/Threading/TimerFactorySpecs.cs b/product/Service/Infrastructure/Threading/TimerFactorySpecs.cs index ad88da1..3b846d0 100644 --- a/product/Service/Infrastructure/Threading/TimerFactorySpecs.cs +++ b/product/Service/Infrastructure/Threading/TimerFactorySpecs.cs @@ -3,7 +3,7 @@ using System.Timers; using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [Concern(typeof (TimerFactory))] public abstract class behaves_like_a_timer_factory : concerns_for<ITimerFactory, TimerFactory> @@ -31,11 +31,11 @@ namespace Gorilla.Commons.Infrastructure.Threading () => result.Interval.should_be_equal_to(milliseconds); because b = () => - { - var timer_interval = new TimeSpan(50); - milliseconds = 50; - result = sut.create_for(timer_interval); - }; + { + var timer_interval = new TimeSpan(50); + milliseconds = 50; + result = sut.create_for(timer_interval); + }; static Timer result; static double milliseconds; diff --git a/product/Service/Infrastructure/Threading/WorkItem.cs b/product/Service/Infrastructure/Threading/WorkItem.cs index 71ccb87..391d298 100644 --- a/product/Service/Infrastructure/Threading/WorkItem.cs +++ b/product/Service/Infrastructure/Threading/WorkItem.cs @@ -1,7 +1,7 @@ using System; using System.Threading; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { [Serializable] internal class WorkItem : IAsyncResult diff --git a/product/Service/Infrastructure/Threading/WorkerThread.cs b/product/Service/Infrastructure/Threading/WorkerThread.cs index 57380ea..e1c1513 100644 --- a/product/Service/Infrastructure/Threading/WorkerThread.cs +++ b/product/Service/Infrastructure/Threading/WorkerThread.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel; using Gorilla.Commons.Infrastructure.Logging; -namespace Gorilla.Commons.Infrastructure.Threading +namespace MoMoney.Service.Infrastructure.Threading { public class WorkerThread : Component, IWorkerThread { diff --git a/product/Service/Infrastructure/Transactions/EmptyUnitOfWork.cs b/product/Service/Infrastructure/Transactions/EmptyUnitOfWork.cs index 8487c23..b600274 100644 --- a/product/Service/Infrastructure/Transactions/EmptyUnitOfWork.cs +++ b/product/Service/Infrastructure/Transactions/EmptyUnitOfWork.cs @@ -1,4 +1,5 @@ using Gorilla.Commons.Infrastructure.Logging; +using MoMoney.Service.Contracts.Infrastructure.Transactions; namespace MoMoney.Service.Infrastructure.Transactions { diff --git a/product/Service/Infrastructure/Transactions/UnitOfWork.cs b/product/Service/Infrastructure/Transactions/UnitOfWork.cs index 7981352..133ef87 100644 --- a/product/Service/Infrastructure/Transactions/UnitOfWork.cs +++ b/product/Service/Infrastructure/Transactions/UnitOfWork.cs @@ -1,4 +1,5 @@ -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; +using MoMoney.Service.Contracts.Infrastructure.Transactions; namespace MoMoney.Service.Infrastructure.Transactions { diff --git a/product/Service/Infrastructure/Transactions/UnitOfWorkFactory.cs b/product/Service/Infrastructure/Transactions/UnitOfWorkFactory.cs index 349ed5b..819d3a1 100644 --- a/product/Service/Infrastructure/Transactions/UnitOfWorkFactory.cs +++ b/product/Service/Infrastructure/Transactions/UnitOfWorkFactory.cs @@ -1,4 +1,4 @@ -using Gorilla.Commons.Infrastructure.Transactions; +using MoMoney.DataAccess.Transactions; using MoMoney.Service.Contracts.Infrastructure.Transactions; namespace MoMoney.Service.Infrastructure.Transactions diff --git a/product/Service/Infrastructure/Transactions/UnitOfWorkFactorySpecs.cs b/product/Service/Infrastructure/Transactions/UnitOfWorkFactorySpecs.cs index 1d5be3a..023d382 100644 --- a/product/Service/Infrastructure/Transactions/UnitOfWorkFactorySpecs.cs +++ b/product/Service/Infrastructure/Transactions/UnitOfWorkFactorySpecs.cs @@ -1,6 +1,6 @@ using developwithpassion.bdd.contexts; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Testing; +using MoMoney.DataAccess.Transactions; using MoMoney.Service.Contracts.Infrastructure.Transactions; namespace MoMoney.Service.Infrastructure.Transactions diff --git a/product/Service/Infrastructure/Transactions/UnitOfWorkSpecs.cs b/product/Service/Infrastructure/Transactions/UnitOfWorkSpecs.cs index fdd87fc..431b323 100644 --- a/product/Service/Infrastructure/Transactions/UnitOfWorkSpecs.cs +++ b/product/Service/Infrastructure/Transactions/UnitOfWorkSpecs.cs @@ -1,6 +1,7 @@ using developwithpassion.bdd.contexts; -using Gorilla.Commons.Infrastructure.Transactions; using Gorilla.Commons.Testing; +using MoMoney.DataAccess.Transactions; +using MoMoney.Service.Contracts.Infrastructure.Transactions; namespace MoMoney.Service.Infrastructure.Transactions { diff --git a/product/Service/Infrastructure/Updating/CancelUpdate.cs b/product/Service/Infrastructure/Updating/CancelUpdate.cs index e55b41b..f8233bc 100644 --- a/product/Service/Infrastructure/Updating/CancelUpdate.cs +++ b/product/Service/Infrastructure/Updating/CancelUpdate.cs @@ -1,4 +1,4 @@ -using MoMoney.Tasks.infrastructure.updating; +using MoMoney.Service.Contracts.Infrastructure.Updating; namespace MoMoney.Service.Infrastructure.Updating { diff --git a/product/Service/Infrastructure/Updating/CancelUpdateSpecs.cs b/product/Service/Infrastructure/Updating/CancelUpdateSpecs.cs index ff5be66..f57b8e6 100644 --- a/product/Service/Infrastructure/Updating/CancelUpdateSpecs.cs +++ b/product/Service/Infrastructure/Updating/CancelUpdateSpecs.cs @@ -1,8 +1,8 @@ using developwithpassion.bdd.contexts; using Gorilla.Commons.Testing; -using MoMoney.Service.Infrastructure.Updating; +using MoMoney.Service.Contracts.Infrastructure.Updating; -namespace MoMoney.Tasks.infrastructure.updating +namespace MoMoney.Service.Infrastructure.Updating { public class CancelUpdateSpecs { diff --git a/product/Service/Infrastructure/Updating/CurrentDeployment.cs b/product/Service/Infrastructure/Updating/CurrentDeployment.cs index 175071d..43a1fc0 100644 --- a/product/Service/Infrastructure/Updating/CurrentDeployment.cs +++ b/product/Service/Infrastructure/Updating/CurrentDeployment.cs @@ -1,9 +1,8 @@ using System; using System.ComponentModel; using System.Deployment.Application; -using MoMoney.Service.Infrastructure.Updating; -namespace MoMoney.Tasks.infrastructure.updating +namespace MoMoney.Service.Infrastructure.Updating { public class CurrentDeployment : IDeployment { diff --git a/product/Service/Infrastructure/Updating/DownloadTheLatestVersion.cs b/product/Service/Infrastructure/Updating/DownloadTheLatestVersion.cs index 962592a..647638c 100644 --- a/product/Service/Infrastructure/Updating/DownloadTheLatestVersion.cs +++ b/product/Service/Infrastructure/Updating/DownloadTheLatestVersion.cs @@ -1,5 +1,6 @@ using Gorilla.Commons.Utility; using Gorilla.Commons.Utility.Core; +using MoMoney.Service.Contracts.Infrastructure.Updating; namespace MoMoney.Service.Infrastructure.Updating { diff --git a/product/Service/Infrastructure/Updating/NullDeployment.cs b/product/Service/Infrastructure/Updating/NullDeployment.cs index f4e7e8e..6d0cd26 100644 --- a/product/Service/Infrastructure/Updating/NullDeployment.cs +++ b/product/Service/Infrastructure/Updating/NullDeployment.cs @@ -2,9 +2,8 @@ using System; using System.ComponentModel; using System.Deployment.Application; using System.Threading; -using MoMoney.Service.Infrastructure.Updating; -namespace MoMoney.Tasks.infrastructure.updating +namespace MoMoney.Service.Infrastructure.Updating { public class NullDeployment : IDeployment { diff --git a/product/Service/Infrastructure/debugging/Launch.cs b/product/Service/Infrastructure/debugging/Launch.cs new file mode 100644 index 0000000..82ebac2 --- /dev/null +++ b/product/Service/Infrastructure/debugging/Launch.cs @@ -0,0 +1,26 @@ +using System; +using System.Diagnostics; + +namespace MoMoney.Service.Infrastructure.debugging +{ + static public class Launch + { + static public void the_debugger() + { +#if DEBUG + if (Debugger.IsAttached) Debugger.Break(); + else Debugger.Launch(); +#endif + } + + static public void the_debugger_if(Func<bool> condition) + { +#if DEBUG + if (!condition()) return; + + if (Debugger.IsAttached) Debugger.Break(); + else Debugger.Launch(); +#endif + } + } +}
\ No newline at end of file diff --git a/product/Service/Service.csproj b/product/Service/Service.csproj index f846982..14f98aa 100644 --- a/product/Service/Service.csproj +++ b/product/Service/Service.csproj @@ -98,6 +98,7 @@ <Compile Include="Application\IEventLog.cs" /> <Compile Include="Application\RegisterNewCompanyCommand.cs" /> <Compile Include="Application\SaveNewBillCommand.cs" /> + <Compile Include="Infrastructure\debugging\Launch.cs" /> <Compile Include="Infrastructure\Eventing\EventAggregator.cs" /> <Compile Include="Infrastructure\Eventing\EventAggregatorSpecs.cs" /> <Compile Include="Infrastructure\Eventing\IEvent.cs" /> diff --git a/product/utility/AttributeExtensions.cs b/product/utility/AttributeExtensions.cs new file mode 100644 index 0000000..bd32181 --- /dev/null +++ b/product/utility/AttributeExtensions.cs @@ -0,0 +1,28 @@ +using System; +using System.Reflection; + +namespace momoney.utility +{ + static public class AttributeExtensions + { + static public bool is_decorated_with<T>(this object item) where T : Attribute + { + return item.GetType().is_decorated_with<T>(); + } + + static public bool is_decorated_with<T>(this ICustomAttributeProvider item) where T : Attribute + { + return item.IsDefined(typeof (T), true); + } + + static public T attribute<T>(this object item) where T : Attribute + { + return item.GetType().attribute<T>(); + } + + static public T attribute<T>(this ICustomAttributeProvider item) where T : Attribute + { + return (T) item.GetCustomAttributes(typeof (T), true)[0]; + } + } +}
\ No newline at end of file diff --git a/product/utility/Properties/AssemblyInfo.cs b/product/utility/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..74463bf --- /dev/null +++ b/product/utility/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("utility")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("utility")] +[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("4214063d-bc70-4ed8-a536-a90c8a65741e")] + +// 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")] diff --git a/product/utility/utility.csproj b/product/utility/utility.csproj new file mode 100644 index 0000000..66ca21b --- /dev/null +++ b/product/utility/utility.csproj @@ -0,0 +1,59 @@ +<?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>{22DF610D-CBC8-4042-A470-ABF246C5DDD4}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>momoney.utility</RootNamespace> + <AssemblyName>momoney.utility</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="AttributeExtensions.cs" /> + <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 diff --git a/solution.sln b/solution.sln index b3d3fb4..8e57290 100644 --- a/solution.sln +++ b/solution.sln @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Presentation", "product\Pre 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}") = "utility", "product\utility\utility.csproj", "{22DF610D-CBC8-4042-A470-ABF246C5DDD4}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -55,6 +57,10 @@ 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 + {22DF610D-CBC8-4042-A470-ABF246C5DDD4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {22DF610D-CBC8-4042-A470-ABF246C5DDD4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {22DF610D-CBC8-4042-A470-ABF246C5DDD4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {22DF610D-CBC8-4042-A470-ABF246C5DDD4}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE |
