I have the following code in an IoC Simple Injector container:
container.RegisterDecorator(typeof(ICommandHandler<>),
typeof(ValidationCommandHandlerDecorator<>));
I need to translate this to the equivalent of Ninject. I read that the Decorator template in Ninject is executed using a method WhenInjectedInto, but for all the expectation, for example, 3 parameters are required:
Bind<IRepository>().To<SimpleRepository>
.WhenInjectedInto<AdvancedRespository>();
This method in Simple Injector takes only 2, so could you tell me, please, what am I missing here?
source
share