Is there a way to replace the Activator.CreateInstance () call used inside NHibernate 2.0.1GA to create objects? Ideally, I would like to replace it with StructureMap.ObjectFactory.GetInstance ().
You cannot easily do this with constructor injection. NHibernate internal elements may need to create a proxy object inherited from your domain class using the Lazy boot code, etc. Therefore, as far as I know, there is no easy way to override the design of your object.
, NHibernate , , , setterter. . Windsor DI, StructureMap, - StructureMap - " (BuildUp)".
: , , , , , !
Fabio Maulo ( NHibernate), . NHibernate 2.1, , 2.0.1GA, IProxyFactoryFactory.
setterinjetion, IInterceptor onload Objectfactory.BuildUp. , , .
, IBytecodeProvider ReflectionOptimizer. , !
. 99,9% . , 0,01% , . , , goto.