I am doing a project using Ninject 2 and one question bothers me:
If you want to intercept methods in your type, you need to wrap it in a proxy (for a dynamic lock proxy). If the specified type does not have a constructor without parameters, proxy creation is not performed. If so, this constructor is used when an instance of the instance is resolved from the kernel.
Unfortunately, this means that my injection constructor with parameters is ignored, and I have to resort to property injection. I have some reluctance to associate my domain types with the [Inject] attribute by property.
Is it possible to use the injection constructor with proxies for AoP using Ninject?
source
share