tag:blogger.com,1999:blog-15136575.post3133230181690703860..comments2023-10-17T12:00:16.772+01:00Comments on Code rant: 10 Advanced Windsor Tricks – 1. Registering DelegatesMike Hadlowhttp://www.blogger.com/profile/16441901713967254504noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-15136575.post-37399891299749793482013-08-23T13:57:20.488+01:002013-08-23T13:57:20.488+01:00Hi Mike,
You've said:
"For example, sa...Hi Mike,<br /><br />You've said: <br /><br />"For example, say you want to resolve different named instances of the same component at runtime. Without this trick you would have to reference the container itself, which is an IoC anti-pattern of epic proportions. Instead, just register a delegate that takes a string and returns your service type then supply container.Resolve as it’s instance"<br /><br />In your example, which is of course simplistic, I can see how this is done. However, say you needed to resolve the implementation deep down in the object graph, how would you then use this technique?<br /><br />I hope that my question is clear.DavidSnoreply@blogger.com