Commit 84b844f
Changed files (31)
trunk
product
MyMoney
boot
container
registration
DataAccess
Domain
accounting
billing
Infrastructure
Presentation
Model
Presenters
Views
Shell
Utility
Extensions
trunk/product/MyMoney/boot/container/registration/wire_up_the_infrastructure_in_to_the.cs
@@ -24,6 +24,7 @@ namespace MoMoney.boot.container.registration
registry.singleton<IUnitOfWorkRegistry, UnitOfWorkRegistry>();
registry.singleton<IProject, CurrentProject>();
registry.transient(typeof (IRegistry<>), typeof (DefaultRegistry<>));
+ registry.transient(typeof (IUnitOfWorkRegistrationFactory<>), typeof (UnitOfWorkRegistrationFactory<>));
}
}
}
\ No newline at end of file
trunk/product/MyMoney/DataAccess/db40/Session.cs โ trunk/product/MyMoney/DataAccess/db40/AttachedSession.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Threading;
using Db4objects.Db4o;
using MoMoney.Domain.Core;
using MoMoney.Infrastructure.Extensions;
@@ -15,12 +14,12 @@ namespace MoMoney.DataAccess.db40
void commit();
}
- public class Session : ISession
+ public class AttachedSession : ISession
{
readonly IObjectContainer connection;
- Guid session_id;
+ readonly Guid session_id;
- public Session(IObjectContainer connection)
+ public AttachedSession(IObjectContainer connection)
{
this.connection = connection;
session_id = Guid.NewGuid();
@@ -37,7 +36,7 @@ namespace MoMoney.DataAccess.db40
{
this.log().debug("already added: {0}, from {1}", item, session_id);
}
- this.log().debug("adding item: {0}, {1} {2}", item, session_id, Thread.CurrentThread.ManagedThreadId);
+ this.log().debug("adding item: {0}, {1}", item, session_id);
connection.Store(item);
}
trunk/product/MyMoney/DataAccess/db40/EmptySession.cs โ trunk/product/MyMoney/DataAccess/db40/DetachedSession.cs
@@ -7,12 +7,12 @@ using MoMoney.Utility.Extensions;
namespace MoMoney.DataAccess.db40
{
- public class EmptySession : ISession
+ public class DetachedSession : ISession
{
readonly HashSet<object> items;
- Guid session_id;
+ readonly Guid session_id;
- public EmptySession()
+ public DetachedSession()
{
items = new HashSet<object>();
session_id = Guid.NewGuid();
trunk/product/MyMoney/DataAccess/db40/SessionContext.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using Castle.Core;
using Db4objects.Db4o;
using MoMoney.Presentation.Model.Projects;
@@ -22,7 +21,7 @@ namespace MoMoney.DataAccess.db40
public SessionContext(IConnectionFactory connection_factory)
{
this.connection_factory = connection_factory;
- session = new EmptySession();
+ session = new DetachedSession();
sessions = new Dictionary<IFile, IObjectContainer>();
}
@@ -30,12 +29,12 @@ namespace MoMoney.DataAccess.db40
{
var container = connection_factory.open_connection_to(file);
sessions.Add(file, container);
- session = new Session(container);
+ session = new AttachedSession(container);
}
public ISession current_session()
{
- if (null == session) session = new EmptySession();
+ if (null == session) session = new DetachedSession();
return session;
}
trunk/product/MyMoney/Domain/accounting/billing/Company.cs
@@ -33,7 +33,7 @@ namespace MoMoney.Domain.accounting.billing
public override string ToString()
{
- return base.ToString() + " " + name;
+ return name;
}
}
}
\ No newline at end of file
trunk/product/MyMoney/Infrastructure/eventing/EventAggregator.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
+using MoMoney.Infrastructure.Extensions;
using MoMoney.Utility.Extensions;
namespace MoMoney.Infrastructure.eventing
@@ -32,6 +33,11 @@ namespace MoMoney.Infrastructure.eventing
{
get_list_for<Event>()
.Select(x => x.downcast_to<IEventSubscriber<Event>>())
+ .Select(x =>
+ {
+ this.log().debug("publishing: {0} to {1}", typeof (Event), x);
+ return x;
+ })
.each(x => x.notify(the_event_to_broadcast));
}
trunk/product/MyMoney/Infrastructure/interceptors/UnitOfWorkInterceptor.cs
@@ -26,7 +26,7 @@ namespace MoMoney.Infrastructure.interceptors
if (registry.has_changes_to_commit())
{
registry.commit_all();
- broker.publish<unsaved_changes_event>();
+ broker.publish<UnsavedChangesEvent>();
}
}
}
trunk/product/MyMoney/Infrastructure/transactions/UnitOfWork.cs
@@ -1,25 +1,16 @@
-using System;
using MoMoney.Domain.Core;
using MoMoney.Infrastructure.Container;
-using MoMoney.Infrastructure.Logging;
namespace MoMoney.Infrastructure.transactions
{
- static public class UnitOfWork
+ public static class UnitOfWork
{
- static public IUnitOfWork<T> For<T>() where T : IEntity
+ public static IUnitOfWork<T> For<T>() where T : IEntity
{
IUnitOfWork<T> unit_of_work = null;
if (resolve.is_initialized())
{
- try
- {
- unit_of_work = resolve.dependency_for<IUnitOfWorkRegistry>().start_unit_of_work_for<T>();
- }
- catch (Exception exception)
- {
- Log.For(typeof (UnitOfWork)).error(exception);
- }
+ unit_of_work = resolve.dependency_for<IUnitOfWorkRegistry>().start_unit_of_work_for<T>();
}
return unit_of_work ?? new NullUnitOfWork<T>();
}
trunk/product/MyMoney/Presentation/Model/Menu/File/Commands/exit_command_specs.cs
@@ -32,7 +32,7 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
{
it should_ask_the_application_environment_to_shut_down = () => application.was_told_to(x => x.shut_down());
- it should_publish_the_shut_down_event = () => broker.was_told_to(x => x.publish<closing_the_application>());
+ it should_publish_the_shut_down_event = () => broker.was_told_to(x => x.publish<ClosingTheApplication>());
because b = () => sut.saved();
}
@@ -41,7 +41,7 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
{
it should_ask_the_application_environment_to_shut_down = () => application.was_told_to(x => x.shut_down());
- it should_publish_the_shut_down_event = () => broker.was_told_to(x => x.publish<closing_the_application>());
+ it should_publish_the_shut_down_event = () => broker.was_told_to(x => x.publish<ClosingTheApplication>());
because b = () => sut.not_saved();
}
@@ -51,7 +51,7 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
{
it should_not_ask_the_application_environment_to_shut_down = () => application.was_told_to(x => x.shut_down());
- it should_not_publish_the_shut_down_event = () => broker.was_told_to(x => x.publish<closing_the_application>());
+ it should_not_publish_the_shut_down_event = () => broker.was_told_to(x => x.publish<ClosingTheApplication>());
because b = () => sut.not_saved();
}
trunk/product/MyMoney/Presentation/Model/Menu/File/Commands/ExitCommand.cs
@@ -43,7 +43,7 @@ namespace MoMoney.Presentation.Model.Menu.File.Commands
void shut_down()
{
- broker.publish<closing_the_application>();
+ broker.publish<ClosingTheApplication>();
application.shut_down();
}
}
trunk/product/MyMoney/Presentation/Model/messages/closing_project_event.cs
@@ -2,7 +2,7 @@ using MoMoney.Infrastructure.eventing;
namespace MoMoney.Presentation.Model.messages
{
- public class closing_project_event : IEvent
+ public class ClosingProjectEvent : IEvent
{
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/messages/closing_the_application.cs
@@ -2,7 +2,7 @@ using MoMoney.Infrastructure.eventing;
namespace MoMoney.Presentation.Model.messages
{
- public class closing_the_application : IEvent
+ public class ClosingTheApplication : IEvent
{
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/messages/new_project_opened.cs
@@ -2,9 +2,9 @@ using MoMoney.Infrastructure.eventing;
namespace MoMoney.Presentation.Model.messages
{
- public class new_project_opened : IEvent
+ public class NewProjectOpened : IEvent
{
- public new_project_opened(string path)
+ public NewProjectOpened(string path)
{
this.path = path;
}
trunk/product/MyMoney/Presentation/Model/messages/saved_changes_event.cs
@@ -2,7 +2,7 @@ using MoMoney.Infrastructure.eventing;
namespace MoMoney.Presentation.Model.messages
{
- public class saved_changes_event : IEvent
+ public class SavedChangesEvent : IEvent
{
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/messages/unsaved_changes_event.cs
@@ -2,7 +2,7 @@ using MoMoney.Infrastructure.eventing;
namespace MoMoney.Presentation.Model.messages
{
- public class unsaved_changes_event : IEvent
+ public class UnsavedChangesEvent : IEvent
{
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Model/Projects/CurrentProject.cs
@@ -41,9 +41,10 @@ namespace MoMoney.Presentation.Model.Projects
public void start_new_project()
{
close_project();
+ context.close_session_to(current_file);
is_project_open = true;
current_file = null;
- broker.publish(new new_project_opened(name()));
+ broker.publish(new NewProjectOpened(name()));
}
public void open_project_from(IFile file)
@@ -53,7 +54,7 @@ namespace MoMoney.Presentation.Model.Projects
current_file = file;
is_project_open = true;
context.start_session_for(current_file);
- broker.publish(new new_project_opened(name()));
+ broker.publish(new NewProjectOpened(name()));
}
public void save_changes()
@@ -62,7 +63,7 @@ namespace MoMoney.Presentation.Model.Projects
registry.commit_all();
registry.Dispose();
context.commit_current_session();
- broker.publish<saved_changes_event>();
+ broker.publish<SavedChangesEvent>();
}
public void save_project_to(IFile new_file)
@@ -80,7 +81,8 @@ namespace MoMoney.Presentation.Model.Projects
registry.Dispose();
context.close_session_to(current_file);
is_project_open = false;
- broker.publish<closing_project_event>();
+ current_file = null;
+ broker.publish<ClosingProjectEvent>();
}
public bool has_been_saved_at_least_once()
@@ -97,7 +99,7 @@ namespace MoMoney.Presentation.Model.Projects
{
if (!has_been_saved_at_least_once())
{
- throw new file_not_specified_exception();
+ throw new FileNotSpecifiedException();
}
}
}
trunk/product/MyMoney/Presentation/Model/Projects/CurrentProjectSpecs.cs
@@ -28,7 +28,7 @@ namespace MoMoney.Presentation.Model.Projects
public class when_saving_the_current_project : behaves_like_a_project
{
- it should_notify_the_rest_of_the_application = () => broker.was_told_to(x => x.publish<saved_changes_event>());
+ it should_notify_the_rest_of_the_application = () => broker.was_told_to(x => x.publish<SavedChangesEvent>());
context c = () =>
{
@@ -50,7 +50,7 @@ namespace MoMoney.Presentation.Model.Projects
public class when_attempting_to_save_the_changes_to_a_project_and_a_file_to_save_to_has_not_been_specified :
behaves_like_a_project
{
- it should_inform_the_user_of_an_error = () => the_call.should_have_thrown<file_not_specified_exception>();
+ it should_inform_the_user_of_an_error = () => the_call.should_have_thrown<FileNotSpecifiedException>();
because b = () => { the_call = call.to(() => sut.save_changes()); };
@@ -160,7 +160,7 @@ namespace MoMoney.Presentation.Model.Projects
public class when_starting_a_new_project_and_a_project_was_already_open : behaves_like_a_project
{
- it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<closing_project_event>());
+ it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<ClosingProjectEvent>());
because b = () =>
{
@@ -171,7 +171,7 @@ namespace MoMoney.Presentation.Model.Projects
public class when_opening_an_existing_project_and_a_project_was_already_open : behaves_like_a_project
{
- it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<closing_project_event>());
+ it should_close_the_previous_project = () => broker.was_told_to(x => x.publish<ClosingProjectEvent>());
context c = () =>
{
trunk/product/MyMoney/Presentation/Presenters/Commands/RestartCommand.cs
@@ -22,7 +22,7 @@ namespace MoMoney.Presentation.Presenters.Commands
public void run()
{
- broker.publish<closing_the_application>();
+ broker.publish<ClosingTheApplication>();
application.restart();
}
}
trunk/product/MyMoney/Presentation/Presenters/Shell/ApplicationShellPresenter.cs
@@ -5,8 +5,8 @@ using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface IApplicationShellPresenter : IPresentationModule, IEventSubscriber<new_project_opened>,
- IEventSubscriber<closing_project_event>
+ public interface IApplicationShellPresenter : IPresentationModule, IEventSubscriber<NewProjectOpened>,
+ IEventSubscriber<ClosingProjectEvent>
{
}
@@ -23,17 +23,17 @@ namespace MoMoney.Presentation.Presenters.Shell
public void run()
{
- broker.subscribe_to<new_project_opened>(this);
- broker.subscribe_to<closing_project_event>(this);
+ broker.subscribe_to<NewProjectOpened>(this);
+ broker.subscribe_to<ClosingProjectEvent>(this);
}
- public void notify(new_project_opened message)
+ public void notify(NewProjectOpened message)
{
//shell.clear_menu_items();
//shell.close_all_windows();
}
- public void notify(closing_project_event message)
+ public void notify(ClosingProjectEvent message)
{
shell.close_all_windows();
}
trunk/product/MyMoney/Presentation/Presenters/Shell/GettingStartedModule.cs
@@ -5,7 +5,7 @@ using MoMoney.Presentation.Presenters.Commands;
namespace MoMoney.Presentation.Presenters.Shell
{
- public interface IGettingStartedModule : IPresentationModule, IEventSubscriber<new_project_opened>
+ public interface IGettingStartedModule : IPresentationModule, IEventSubscriber<NewProjectOpened>
{
}
@@ -26,7 +26,7 @@ namespace MoMoney.Presentation.Presenters.Shell
command.run<IGettingStartedPresenter>();
}
- public void notify(new_project_opened message)
+ public void notify(NewProjectOpened message)
{
command.run<IGettingStartedPresenter>();
}
trunk/product/MyMoney/Presentation/Presenters/Shell/NotificationIconPresenter.cs
@@ -7,8 +7,8 @@ using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
public interface INotificationIconPresenter : IPresentationModule,
- IEventSubscriber<closing_the_application>,
- IEventSubscriber<new_project_opened>
+ IEventSubscriber<ClosingTheApplication>,
+ IEventSubscriber<NewProjectOpened>
{
}
@@ -25,17 +25,17 @@ namespace MoMoney.Presentation.Presenters.Shell
public void run()
{
- broker.subscribe_to<closing_the_application>(this);
- broker.subscribe_to<new_project_opened>(this);
+ broker.subscribe_to<ClosingTheApplication>(this);
+ broker.subscribe_to<NewProjectOpened>(this);
view.display(ApplicationIcons.Application, "mokhan.ca");
}
- public void notify(closing_the_application message)
+ public void notify(ClosingTheApplication message)
{
view.Dispose();
}
- public void notify(new_project_opened message)
+ public void notify(NewProjectOpened message)
{
view.opened_new_project();
}
trunk/product/MyMoney/Presentation/Presenters/Shell/StatusBarPresenter.cs
@@ -9,10 +9,10 @@ using MoMoney.Utility.Extensions;
namespace MoMoney.Presentation.Presenters.Shell
{
public interface IStatusBarPresenter : IPresentationModule,
- IEventSubscriber<saved_changes_event>,
- IEventSubscriber<new_project_opened>,
- IEventSubscriber<closing_the_application>,
- IEventSubscriber<closing_project_event>
+ IEventSubscriber<SavedChangesEvent>,
+ IEventSubscriber<NewProjectOpened>,
+ IEventSubscriber<ClosingTheApplication>,
+ IEventSubscriber<ClosingProjectEvent>
{
}
@@ -29,28 +29,28 @@ namespace MoMoney.Presentation.Presenters.Shell
public void run()
{
- broker.subscribe_to<saved_changes_event>(this);
- broker.subscribe_to<new_project_opened>(this);
- broker.subscribe_to<closing_the_application>(this);
- broker.subscribe_to<closing_project_event>(this);
+ broker.subscribe_to<SavedChangesEvent>(this);
+ broker.subscribe_to<NewProjectOpened>(this);
+ broker.subscribe_to<ClosingTheApplication>(this);
+ broker.subscribe_to<ClosingProjectEvent>(this);
}
- public void notify(saved_changes_event message)
+ public void notify(SavedChangesEvent message)
{
view.display(ApplicationIcons.ApplicationReady, "Last Saved: {0}".formatted_using(Clock.now()));
}
- public void notify(new_project_opened message)
+ public void notify(NewProjectOpened message)
{
view.display(ApplicationIcons.ApplicationReady, "Ready");
}
- public void notify(closing_the_application message)
+ public void notify(ClosingTheApplication message)
{
view.display(ApplicationIcons.Empty, "Good Bye!");
}
- public void notify(closing_project_event message)
+ public void notify(ClosingProjectEvent message)
{
view.display(ApplicationIcons.ApplicationReady, "Ready");
}
trunk/product/MyMoney/Presentation/Presenters/Shell/StatusBarPresenterSpecs.cs
@@ -21,7 +21,7 @@ namespace MoMoney.Presentation.Presenters.Shell
broker = the_dependency<IEventAggregator>();
};
- because b = () => sut.notify(new new_project_opened(""));
+ because b = () => sut.notify(new NewProjectOpened(""));
//public override IStatusBarPresenter create_sut()
//{
trunk/product/MyMoney/Presentation/Presenters/Shell/TaskTrayPresenter.cs
@@ -6,8 +6,8 @@ using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
public interface ITaskTrayPresenter : IPresentationModule,
- IEventSubscriber<saved_changes_event>,
- IEventSubscriber<new_project_opened>
+ IEventSubscriber<SavedChangesEvent>,
+ IEventSubscriber<NewProjectOpened>
{
}
@@ -26,16 +26,16 @@ namespace MoMoney.Presentation.Presenters.Shell
{
view.display("Welcome!");
view.display("Visit http://mokhan.ca for more information!");
- broker.subscribe_to<saved_changes_event>(this);
- broker.subscribe_to<new_project_opened>(this);
+ broker.subscribe_to<SavedChangesEvent>(this);
+ broker.subscribe_to<NewProjectOpened>(this);
}
- public void notify(saved_changes_event message)
+ public void notify(SavedChangesEvent message)
{
view.display("successfully saved changes");
}
- public void notify(new_project_opened message)
+ public void notify(NewProjectOpened message)
{
view.display("opened {0}", message.path);
}
trunk/product/MyMoney/Presentation/Presenters/Shell/TitleBarPresenter.cs
@@ -7,9 +7,10 @@ using MoMoney.Presentation.Views.Shell;
namespace MoMoney.Presentation.Presenters.Shell
{
public interface ITitleBarPresenter : IPresentationModule,
- IEventSubscriber<unsaved_changes_event>,
- IEventSubscriber<saved_changes_event>,
- IEventSubscriber<new_project_opened>
+ IEventSubscriber<UnsavedChangesEvent>,
+ IEventSubscriber<SavedChangesEvent>,
+ IEventSubscriber<NewProjectOpened>,
+ IEventSubscriber<ClosingProjectEvent>
{
}
@@ -29,23 +30,29 @@ namespace MoMoney.Presentation.Presenters.Shell
public void run()
{
view.display(project.name());
- broker.subscribe_to<unsaved_changes_event>(this);
- broker.subscribe_to<saved_changes_event>(this);
- broker.subscribe_to<new_project_opened>(this);
+ broker.subscribe_to<UnsavedChangesEvent>(this);
+ broker.subscribe_to<SavedChangesEvent>(this);
+ broker.subscribe_to<NewProjectOpened>(this);
+ broker.subscribe_to<ClosingProjectEvent>(this);
}
- public void notify(unsaved_changes_event dto)
+ public void notify(UnsavedChangesEvent dto)
{
view.append_asterik();
}
- public void notify(saved_changes_event message)
+ public void notify(SavedChangesEvent message)
{
view.display(project.name());
view.remove_asterik();
}
- public void notify(new_project_opened message)
+ public void notify(NewProjectOpened message)
+ {
+ view.display(project.name());
+ }
+
+ public void notify(ClosingProjectEvent message)
{
view.display(project.name());
}
trunk/product/MyMoney/Presentation/Presenters/Shell/TitleBarPresenterSpecs.cs
@@ -12,11 +12,6 @@ namespace MoMoney.Presentation.Presenters.Shell
[Concern(typeof (TitleBarPresenter))]
public abstract class behaves_like_a_title_bar_presenter : concerns_for<ITitleBarPresenter, TitleBarPresenter>
{
- //public override ITitleBarPresenter create_sut()
- //{
- // return new TitleBarPresenter(view, project, broker);
- //}
-
context c = () =>
{
project = the_dependency<IProject>();
@@ -34,13 +29,13 @@ namespace MoMoney.Presentation.Presenters.Shell
it should_display_the_name_of_the_file_that_is_opened = () => view.was_told_to(x => x.display("untitled.mo"));
it should_ask_to_be_notified_of_any_unsaved_changes =
- () => broker.was_told_to(x => x.subscribe_to<unsaved_changes_event>(sut));
+ () => broker.was_told_to(x => x.subscribe_to<UnsavedChangesEvent>(sut));
it should_ask_to_be_notified_when_the_project_is_saved =
- () => broker.was_told_to(x => x.subscribe_to<saved_changes_event>(sut));
+ () => broker.was_told_to(x => x.subscribe_to<SavedChangesEvent>(sut));
it should_ask_to_be_notified_when_a_new_project_is_opened =
- () => broker.was_told_to(x => x.subscribe_to<new_project_opened>(sut));
+ () => broker.was_told_to(x => x.subscribe_to<NewProjectOpened>(sut));
context c = () => when_the(project).is_told_to(x => x.name()).it_will_return("untitled.mo");
@@ -51,10 +46,10 @@ namespace MoMoney.Presentation.Presenters.Shell
{
it should_display_an_asterik_in_the_title = () => view.was_told_to(x => x.append_asterik());
- context c = () => { dto = new unsaved_changes_event(); };
+ context c = () => { dto = new UnsavedChangesEvent(); };
because b = () => sut.notify(dto);
- static unsaved_changes_event dto;
+ static UnsavedChangesEvent dto;
}
}
\ No newline at end of file
trunk/product/MyMoney/Presentation/Views/Shell/TitleBar.cs
@@ -1,3 +1,5 @@
+using MoMoney.Infrastructure.Extensions;
+
namespace MoMoney.Presentation.Views.Shell
{
public interface ITitleBar
@@ -9,7 +11,7 @@ namespace MoMoney.Presentation.Views.Shell
public class TitleBar : ITitleBar
{
- private readonly IShell shell;
+ readonly IShell shell;
public TitleBar(IShell shell)
{
@@ -18,15 +20,18 @@ namespace MoMoney.Presentation.Views.Shell
public void display(string title)
{
- if (shell.Text.Contains("-")) {
+ if (shell.Text.Contains("-"))
+ {
shell.Text = shell.Text.Remove(shell.Text.IndexOf("-") - 1);
}
shell.Text = shell.Text + " - " + title;
+ this.log().debug("displaying title: {0}", title);
}
public void append_asterik()
{
- if (shell.Text.Contains("*")) {
+ if (shell.Text.Contains("*"))
+ {
return;
}
shell.Text = shell.Text + "*";
trunk/product/MyMoney/Utility/Extensions/enumerable_extensions.cs โ trunk/product/MyMoney/Utility/Extensions/EnumerableExtensions.cs
@@ -4,7 +4,7 @@ using System.Linq;
namespace MoMoney.Utility.Extensions
{
- public static class enumerable_extensions
+ public static class EnumerableExtensions
{
public static IList<T> databind<T>(this IEnumerable<T> items_to_bind_to)
{
@@ -12,21 +12,21 @@ namespace MoMoney.Utility.Extensions
}
public static IEnumerable<T> that_satisfy<T>(this IEnumerable<T> items_to_peek_in_to,
- Predicate<T> criteriaToSatisfy)
+ Predicate<T> criteria_to_satisfy)
{
foreach (var item in items_to_peek_in_to ?? new List<T>())
{
- if (item.satisfies(criteriaToSatisfy))
+ if (item.satisfies(criteria_to_satisfy))
{
yield return item;
}
}
}
- public static IEnumerable<T> sorted_using<T>(this IEnumerable<T> itemsToSort, IComparer<T> sortingAlgorithm)
+ public static IEnumerable<T> sorted_using<T>(this IEnumerable<T> items_to_sort, IComparer<T> sorting_algorithm)
{
- var sorted_items = new List<T>(itemsToSort);
- sorted_items.Sort(sortingAlgorithm);
+ var sorted_items = new List<T>(items_to_sort);
+ sorted_items.Sort(sorting_algorithm);
return sorted_items;
}
trunk/product/MyMoney/MyMoney.csproj
@@ -172,10 +172,10 @@
<Compile Include="boot\container\registration\wire_up_the_presentation_modules.cs" />
<Compile Include="boot\container\registration\wire_up_the_services_in_to_the.cs" />
<Compile Include="DataAccess\db40\ConnectionFactory.cs" />
- <Compile Include="DataAccess\db40\EmptySession.cs" />
+ <Compile Include="DataAccess\db40\DetachedSession.cs" />
<Compile Include="DataAccess\db40\ObjectDatabaseGateway.cs" />
<Compile Include="DataAccess\db40\ObjectDatabaseGatewaySpecs.cs" />
- <Compile Include="DataAccess\db40\Session.cs" />
+ <Compile Include="DataAccess\db40\AttachedSession.cs" />
<Compile Include="DataAccess\db40\spiking\db40_spike_specs.cs" />
<Compile Include="DataAccess\repositories\BillRepository.cs" />
<Compile Include="DataAccess\repositories\BillRepositorySpecs.cs" />
@@ -613,7 +613,7 @@
<Compile Include="Utility\Core\OrSpecification.cs" />
<Compile Include="Utility\Extensions\configuration_extensions.cs" />
<Compile Include="Utility\Extensions\conversion_extensions.cs" />
- <Compile Include="Utility\Extensions\enumerable_extensions.cs" />
+ <Compile Include="Utility\Extensions\EnumerableExtensions.cs" />
<Compile Include="Utility\Extensions\func_extensions.cs" />
<Compile Include="Utility\Extensions\mapping_extensions.cs" />
<Compile Include="Utility\Extensions\mapping_extensions_specs.cs" />