intravenous icon indicating copy to clipboard operation
intravenous copied to clipboard

How do I handle injection for decorator pattern scenario?

Open vipreshjha opened this issue 9 years ago • 0 comments

Suppose I want to register more then one binding for a Type and use different binding depending on "parameter or type" is it possible. So for eg. I have 3 classes which Heirarchy as follows AdsRequestProcessor -inherits->TrackerRequestProcessor -inherits->RequestProcessor. And there different classes all of which have dependency on RequestProcessor. and I want to inject AdsRequestProcessor in one and TrackerRequestProcessor in other, so a parameter or class name or any thing else while registering this dependencies will be helpful . Some thing along the lines of NInject's contextual binding.

vipreshjha avatar Nov 17 '14 11:11 vipreshjha