Inject Array of Interfaces in Ninject?

This is largely a restatement of @bsnote's answer (which I've +1d) which may help in understanding why it works in this manner.

It was a problem for me as well. Ninject injects each item of an array instead of the array itself, so you should have a mapping defined for the type of array items. Actually there is no possibility to map the array as a type with the current version of Ninject.

The solution is to create a wrapper around the array. Lazy class can be used for example if it suits you. Or you can create your own wrapper.

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