windsor add a non injectable service to the container

209 views
Skip to first unread message

"José F. Romaniello"

unread,
Jul 9, 2009, 1:23:07 PM7/9/09
to castle-pro...@googlegroups.com
How can I inject a service in the container that has dependencies on
other services... but I don't want this service be injected in others.

For instance:
Services IA , IB, IC, ID, IF, IG

IB depends uppon IA
IC, ID, IF, IG -------> have a property of type IB but
I don't want IB be injected here.

João Bragança

unread,
Jul 9, 2009, 1:52:24 PM7/9/09
to Castle Project Users
You can decorate the property with [DoNotWire]

On Jul 9, 10:23 am, "José F. Romaniello" <jfromanie...@gmail.com>
wrote:

"José F. Romaniello"

unread,
Jul 9, 2009, 3:06:56 PM7/9/09
to castle-pro...@googlegroups.com
It works but... the other solutions is ...................................?
I want to configure this option at the service level.

I want

João Bragança escribió:

Mauricio Scheffer

unread,
Jul 9, 2009, 7:16:12 PM7/9/09
to Castle Project Users
You could use the Kernel.ComponentModelCreated event and remove the
dependency there.

See http://gist.github.com/144086

On Jul 9, 4:06 pm, "José F. Romaniello" <jfromanie...@gmail.com>

"José F. Romaniello"

unread,
Jul 9, 2009, 8:13:28 PM7/9/09
to castle-pro...@googlegroups.com
Thank you Mauricio this is exactly what I want.

Mauricio Scheffer escribió:

"José F. Romaniello"

unread,
Jul 15, 2009, 7:14:58 PM7/15/09
to castle-pro...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages