Setter injection on an existing service instance in Castle Windsor?

See the bottom of this article: jeremyskinner.co.uk/2008/11/08/dependenc... Jeremy provides an extension method for the Windsor Container that implements property injection.

See the bottom of this article: jeremyskinner.co.uk/2008/11/08/dependenc... Jeremy provides an extension method for the Windsor Container that implements property injection.

Thanks. The provided code implements the injection instead of leaving it up to Windsor and is not very performant due to the reflection code and the absence of a caching mechanism. I'll stick it into my code base as a temporary solution though, until I have a more elegant solution.

– Sandor Drieënhuizen Oct 19 '10 at 12:07.

No. Check out the FAQ for rationale. I'm applying dependency injection to pages in ASP.

NET WebForms, See this question.

I see. I'm thinking of writing a facility that uses a lazy component loader to do the setter injection. I know it's all a bit smelly but I think that's inevitable when using ASP.NET WebForms.

– Sandor Drieënhuizen Oct 19 '10 at 14:03.

Thanks, that module is really neat! – Sandor Drieënhuizen Oct 26 '10 at 8:19 I just wish it supported setter injection for user controls. – Sandor Drieënhuizen Oct 26 '10 at 11:14 1 It does support that.

Only when you use LoadControl() yourself it will not work OOTB. – roelofb Oct 26 '10 at 11:42 That's indeed what I am using. Wrapping LoadControl quickly solves that though.

– Sandor Drieënhuizen Oct 26 '10 at 13:08.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions