English 中文(简体)
Castle Windsor ResolveAll that throws when any of registered services cannot be resolved
原标题:

It seems that current behaviour of Castle Windsor (2.0) method


container.ResolveAll(Type type)

is to ignore all services that cannot be resolved due to missing dependencies. What is recommened way to resolve all services + throwing exception when any of services cannot be resolved?

最佳回答

AFAIK there is no built-in way to do that and I ve been thinking about implementing an option to throw instead of ignoring invalid components. However, this has some consequences that need to be thought through.

In the meantime, here s a hack. Let me know if it works for you.

问题回答

暂无回答




相关问题
castle IOC - resolving circular references

quick question for my MVP implementation: currently I have the code below, in which both the presenter and view are resolved via the container. Then the presenter calls View.Init to pass himself to ...

Castle Windsor auto registration

I currently have the following registration set up private static void AddFrameworkComponentsTo(IWindsorContainer container) { container.AddComponent<ITypeConverter, TypeConversionFacade>();...

Authorization and Windsor

I m trying to implement my custom authorize attribute like: public class MyCustomAuth : AuthorizeAttribute { private readonly IUserService _userService; public MyCustomAuth(IUserService ...

How can I override a component registered in Castle Windsor?

I m just starting with Windsor, so please be gentle :) I have a scenario where I want to be able to override/replace components placed inside a windsor container. Read on ... In my prod code, I want ...

热门标签