Permalink
Browse files

updated castle

  • Loading branch information...
1 parent 8ff525d commit 82d86809b278ccb7bc65d36072b369d9e3870678 mnichols committed Jul 13, 2010
@@ -71,8 +71,8 @@ public void Configure(AbstractRhinoServiceBusFacility facility, IConfiguration c
transactional = facility.Transactional,
consumeInTransaction = facility.ConsumeInTransaction,
}),
- AllTypes.Of<IMsmqTransportAction>()
- .FromAssembly(typeof(IMsmqTransportAction).Assembly)
+ AllTypes.FromAssembly(typeof(IMsmqTransportAction).Assembly)
+ .BasedOn<IMsmqTransportAction>()
.Unless(x => x == typeof(ErrorAction))
.WithService.FirstInterface()
.Configure(registration =>
@@ -32,10 +32,10 @@ public void InitializeContainer(IWindsorContainer windsorContainer)
protected virtual void ConfigureContainer()
{
container.Register(
- AllTypes.Of<IDeploymentAction>()
- .FromAssembly(Assembly),
- AllTypes.Of<IEnvironmentValidationAction>()
- .FromAssembly(Assembly)
+ AllTypes.FromAssembly(Assembly)
+ .BasedOn<IDeploymentAction>(),
+ AllTypes.FromAssembly(Assembly)
+ .BasedOn<IEnvironmentValidationAction>()
);
RegisterConsumersFrom (Assembly);
}
@@ -80,8 +80,8 @@ protected override void Init()
ReadConfiguration();
Kernel.Register(
- AllTypes.Of<IBusConfigurationAware>()
- .FromAssembly(typeof(IBusConfigurationAware).Assembly)
+ AllTypes.FromAssembly(typeof(IBusConfigurationAware).Assembly)
+ .BasedOn<IBusConfigurationAware>()
);
foreach (var configurationAware in Kernel.ResolveAll<IBusConfigurationAware>())
@@ -92,7 +92,7 @@ protected override void Init()
foreach (var type in messageModules)
{
if (Kernel.HasComponent(type) == false)
- Kernel.AddComponent(type.FullName, type);
+ Kernel.Register(Component.For(type).Named(type.FullName));
}
RegisterComponents();
View
Binary file not shown.
View
Binary file not shown.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 82d8680

Please sign in to comment.