properties - spring.net proxy factory with target type needs property virtual? -


i'm creating spring.net proxy in code using proxyfactory object proxytargettype true have proxy on non interfaced complex object. proxying seems ok till call method on object. method references public property , if property not virtual it's value null.

this doesn't happen if use spring.aop.framework.autoproxy.inheritancebasedaopconfigurer in spring config file in case can't use because spring context doesn't own object.

is normal have such behavior or there tweak perform want (proxying object virtual method without having change properties virtual)? note tried factory.autodetectinterfaces , factory.proxytargetattributes values doesn't help.

my proxy creation code:

public static t createmethodcallstatproxy<t>()   {    // proxy factory    proxyfactory factory = new proxyfactory();    factory.addadvice(new callmonitortrackeradvice());    factory.proxytargettype = true;        // create instance    factory.target = activator.createinstance<t>();     // proxy    t proxiedclass = (t)factory.getproxy();     return proxiedclass;   } 

thanks help

ok properties need virtual.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -