Is it possible to link containers together in StructureMap like it is in WindsorContainer.AddChildContainer()?
I want to achieve having 3 container levels;
- 1 page request level
- 1 session level
- 1 application level
These would then be chained together so only one instance request would be made to the "base level" container.
The le...
I have implemented a custom lifestyle for Windsor that will allow me to scope components to the current WCF operation. The biggest problem is that the call context initializer is executed after the service has been constructed which means that it cannot have dependencies on components with a perWcfLifestyle because the context for the pe...
My web application (MonoRail, Windsor, ActiveRecord) has a Startable import service and one or more Startable import readers. When, for example, a file is dropped in a directory, a reader parses the file, passes the data to the service, which updates and/or creates objects through repositories. The problem I have is that these Startable ...
I have something like this:
public interface IDeviceMonitor {
int DeviceId { get; }
event DeviceUpdatedHandler NewValueRecieved;
void Start();
void Stop();
}
public class DeviceInactivityDetector {
...
public virtual void DeviceUpdated(IDeviceMonitor device, DeviceUpdatedArgs args) {
....
}
}
curren...
Hi guys
Just a quick one.
In IOC's what does ResolveAll do?? I know that the offical answer is "Resolve all valid components that match this type." but does that mean that it will return any class that implements a given interface?
Cheers
Anthony
...
Using Castle-Windsor, is it possible to declare a type once and use this declaration for multiple Ids rather than writing it out in full each time.
E.g. we have class Widget that implements IFoo and we want the keys "IFoo.A" and "IFoo.B" to get a Widget from Castle. I want to do something like
<id="IFoo.Main"
type="IFoo"
service="W...
Hi,
I'm currently in the process of updating a site from preview 2 of ASP.NET MVC to the Beta release. I'm down to my last compile error with no solution in site after an exhaustive search. I have some code in Global.asax.cs which sets up IOC using the Windsor container:
ControllerBuilder.Current.SetControllerFactory(typeof(WindsorContr...
How can I pass a null constuctor argument using Castle Windsor? I thought the following would work
<parameters>
<repository>null</repository>
<message>null</message>
</parameters>
...
I remember seeing in a sample a while ago that it is possible to break up a windsor configuration file into multiple ones and reference them from the app.config in a way that they get parsed automatically.
Of course I didn't bookmark it and now I can't find it and my Windsor.Config.xml file is creeping up on 600 lines. Can anyone tell ...
I think the answer to this question is so obivous that noone has bothered writing about this, but its late and I really can't get my head around this.
I've been reading into IoC containers (Windsor in this case) and I'm missing how you talk to the container from the various parts of your code.
I get DI, I've been doing poor mans DI (em...
Is it possible to pass a list constructor parameter when resolving a type? I want to use a programmatic configuration if possible. I've been playing around with the Parameters method as shown below, but I've not yet stumbled upon the answer.
container.Register(
Component
.For<IDoSomething>()
.ImplementedBy<DoSomething>()
...
I've got a pretty basic question about how to start using Castle Windsor. I've read up on IOC/DI and would like to try Castle Windsor in an existing solution. I typically like to put any external assemblies in a Lib folder within the solution's folder tree so that the references are relative (I believe this is best practice).
Which ...
The only documentation I've found for the components of the Castle project I've found here in the form of online HTML files. Does anyone know of anything that is more off-line friendly or printable (e.g. PDF). I've got quite the long train commute and I'd like to put something on my laptop. :-)
...
How can I use Windsor in my .net 3.5 solution? Can I use the binaries built for .net 2.0? Do I need to compile the Castle Windsor source myself, targeting 3.5?
...
I'm new to Castle Windsor and am confused about the order in the config file. This is taken from the GettingStarted1 sample. The HttpServiceWatcher class takes an IFailureNotifier implementor in it's constructor. However, no matter how I order the two components that implement this interface -- AlarmFailureNotifier and EmailFailureNot...
I want to perform this CODE equivlant in the castle xml config file.
// Foo(string name)
IFoo f = new Foo(StaticBarClass.Name);
XML
Now for the XML, I know everything (e.g. the blah) except for the stuff inside the parameter part.
What would the parameter part look like?
<component id="blah"
service="blah"
t...
Hey guys, I am having trouble with Castle windsors IoC container when trying to retrieve a generic type. I have added a component using generic notation without a type argumet i.e:
<IoC>
<components>
<component
id="NHibernateRepository"
service="MobilePrototype.Domain.Interfaces.IRepository`1, MobilePrototype.Domain"
type="M...
I have been looking into the castle project and specifically windsor. I have been so impressed with what is possible with this technology and the benefits of having a such a loosely coupled system are definitely apparent. The only thing i am unsure of is if using this method has any downsides, specifically in asp.net?? for example perfor...
Hello,
I don't know if this is too specific a question, if that is possible, but I'm having to port an app that uses Castle Windsor to Unity so that there isn't a reliance on non-microsoft approved libraries. I know I know but what are you going to do.
Anyway I've managed it but I'm not happy with what I've got. In Windsor I had this:
...
I would like to have Windsor inject multiple implementations of a service to a constructor.
My scenario is that I have multiple search providers that implement a common interface. I would like to register each of these with windsor and then inject them into my search service so it can query each on in turn.
Is such a thing possible wi...