Hey!
We try to use NCommon for our project but we have a several composition root. Therefore we can't to define a global ServiceLocator. I 've found that It's possible to override UnitOfWorkScope, TransactionManager and LinqToSqlRepository to replace ServiceLocator.Current on IUnityContainer. But LinqToSqlRepository (and other) have a bad dependency in constructor, although there is a check ServiceLocator.Current !=null (btw throw exception if ServiceLocator isn't set ) but It'll have risk that somebody set once. I offer to add a several virtual methods to clear NCommon.
Hey! We try to use NCommon for our project but we have a several composition root. Therefore we can't to define a global ServiceLocator. I 've found that It's possible to override UnitOfWorkScope, TransactionManager and LinqToSqlRepository to replace ServiceLocator.Current on IUnityContainer. But LinqToSqlRepository (and other) have a bad dependency in constructor, although there is a check ServiceLocator.Current !=null (btw throw exception if ServiceLocator isn't set ) but It'll have risk that somebody set once. I offer to add a several virtual methods to clear NCommon.