Hi I'm having a first attempt at implementing a custom tuplizer in order to provide a required dependancy to one of my entities. I want to create a generalised solution that will work for all entities automatically, as I add required dependencies over time. And I'll also take out the requirement for a no-args constructor to force the delivery of dependencies via the constructor. Looking at PocoInstantiator, I think all I want to do is add a check before the Activator.CreateInstance call, to check whether the IoC system is available and can supply me an instance of the NH-mapped class being instantiated:
http://github.com/leemhenson/nhibernate/tree/master/nhibernate%2Fsrc%2FNHibernate%2FTuple%2FPocoInstantiator.cs#L90 But I'm wondering whether I should be worried about all the other stuff happening in PocoInstantiator. There are references to optimizers, embedded identifiers, etc. Do I need to worry about these? Can I just create a very simpleI IInstantiator implementation that doesn't worry about all that stuff? There are side effects from this decision onto how I implement my Tuplizer. Do I just override PocoEntityTuplizer's BuildInstantiator method, without worrying about the optimizer information it is passing in at the moment. http://github.com/leemhenson/nhibernate/tree/master/nhibernate%2Fsrc%2FNHibernate%2FTuple%2FEntity%2FPocoEntityTuplizer.cs#L80 Cheers Lee --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
