Is it possible to create subclass proxies in spring.net where the proxy is the same instance as the proxied subject?
As far as I can tell, spring.net only allows proxying as a separate object.
That is, the proxy is not the same instance as the subject.
In my old framework NAspect, I placed all the proxy code in the subclass and then delegated the calls back to the base implementation, this way there was no schizofrenia between the proxy and subject, no state problems etc.
Is that somehow possible in Spring.net ?
The
InheritanceBasedAopConfigurercomes closest to what you need. It does not have an internal target, but instead wraps method calls to it’s base class. However, it requires all methods you want to intercept to be declared virtual. But it will make “the proxy the same instance as the subject”, as you put it.