I'm using the attached image to explain what I meant.
-
I have a few classes managed by NInject. Some of them have a few singleton instances, and others are in transient scope. In the image, blue rectangles are singltons, red are transient. The Processor depends on other classes or instances.
-
I want to get the instance of Processor each time by using kernel.Get. However, each time I want to use different values for the objects used by the Processor. See Action1 and Action2 in the image. The code is not real but just for explanation here.
Is there any existing way can meet my needs?
Best Answer
You should be able to pass constructor arguments given that your Processor takes those dependencies as arguments in the constructor.