Windsor lock context binding

Is it possible to get Windsor to return various service implementations based on a single parameter?

For example, if I have a User object that has a Role property, I would like to remove this object differently depending on the Role value. I would like to use IUserService for this, but I have a specific implementation of IUserService defined by the IoC container.

I think Ninject offers this functionality as a "contextual binding", but I'm not sure if Windsor offers it without folding my own resolution logic?

+3
source share
1 answer

, (). . HandlerProvider, , . , ISubDependencyResolver ( ).

+3

Source: https://habr.com/ru/post/1708183/


All Articles