Commit af4bd10
Changed files (4)
trunk
product
MyMoney
boot
container
Infrastructure
Container
Autofac
Windsor
trunk/product/MyMoney/boot/container/registration/wire_up_the_essential_services_into_the.cs
@@ -8,9 +8,9 @@ namespace MoMoney.boot.container.registration
{
internal class wire_up_the_essential_services_into_the : ICommand
{
- readonly WindsorDependencyRegistry registry;
+ readonly IContainerBuilder registry;
- public wire_up_the_essential_services_into_the(WindsorDependencyRegistry registry)
+ public wire_up_the_essential_services_into_the(IContainerBuilder registry)
{
this.registry = registry;
}
trunk/product/MyMoney/boot/container/wire_up_the_container.cs
@@ -4,7 +4,6 @@ using System.Reflection;
using MoMoney.boot.container.registration;
using MoMoney.Infrastructure.Container.Windsor;
using MoMoney.Infrastructure.Container.Windsor.configuration;
-using MoMoney.Infrastructure.Logging;
using MoMoney.Utility.Core;
using MoMoney.Utility.Extensions;
@@ -15,8 +14,8 @@ namespace MoMoney.boot.container
public void run()
{
var container = new WindsorContainerFactory().create();
-
var registry = new WindsorDependencyRegistry(container);
+ //var registry = new AutofacDependencyRegistry();
var specification = new ComponentExclusionSpecification();
var configuration = new ComponentRegistrationConfiguration();
@@ -58,11 +57,11 @@ namespace MoMoney.boot.container
{
if (type.GetInterfaces().Length > 0)
{
- if (typeof(ILoggable).IsAssignableFrom(type))
+ //if (typeof(ILoggable).IsAssignableFrom(type))
{
//builder.proxy(h
}
- else
+ //else
{
builder.transient(type.last_interface(), type);
}
trunk/product/MyMoney/Infrastructure/Container/Autofac/AutofacDependencyRegistry.cs
@@ -2,13 +2,14 @@ using System;
using System.Collections.Generic;
using Autofac;
using Autofac.Builder;
+using MoMoney.Infrastructure.Container.Windsor;
using MoMoney.Infrastructure.proxies;
using MoMoney.Utility.Core;
using MoMoney.Utility.Extensions;
namespace MoMoney.Infrastructure.Container.Autofac
{
- internal class AutofacDependencyRegistry : IDependencyRegistry
+ internal class AutofacDependencyRegistry : IDependencyRegistry, IContainerBuilder
{
ContainerBuilder builder;
Func<IContainer> container;
trunk/product/MyMoney/Infrastructure/Container/Windsor/IContainerBuilder.cs
@@ -4,7 +4,7 @@ using MoMoney.Utility.Core;
namespace MoMoney.Infrastructure.Container.Windsor
{
- public interface IContainerBuilder
+ public interface IContainerBuilder : IDependencyRegistry
{
void singleton<Contract, Implementation>() where Implementation : Contract;
void singleton<Contract>(Contract instance_of_the_contract);