NInject: как передать параметры, когда Get <T> ()?

Я использую прикрепленное изображение, чтобы объяснить, что я имел в виду.

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.

Есть ли какой-нибудь способ удовлетворить мои потребности?Pass parameters when Get

Ответы на вопрос(2)

Ваш ответ на вопрос