I have a generic interface IRepository that has a single concrete generic implementation MyRepository.I use the following code to register for all 开发者_C百科possible type T in one go:
If I register a component with the container with a name (don\'t worry... contrived example!) container.Register(Component.For<double>().Instance(Math.PI).Named(\"pi\")
If I register two components for the same service, e.g. container.Register( Component.For<IThing>.ImplementedBy<Thing1>(),
The event is not triggered when container.Release is called, the following test always fails: public void ComponentDestroyedEvent()
In previous question folks helped me to solve repository lifetime problem, now there\'s a question how to make it work nicely in composite service.
I have two types of interceptors: LoggingWithDebugInterceptor and LoggingInterceptor. I am using the Castle Logging Facility and I am wondering how to write a selector that registers an interceptor on
I\'m trying to convert a factory class that get\'s a message of a certain type and resolves the processors for that message type to an implementation the Typed Factory Facility.
So based on this question (here), of which I asked last week, I decided to go and have a look into the Castle project and use the Castle.Facilities.NHibernateIntegration facility.
I have the following unit test in my application: [TestMethod] public void Windsor_Can_Resolve_HomeController_Dependencies()
With Windsor I can do this: var validators = container.ResolveAll<IEntityValidator<Product>>();