private void InitializeFramework(ArrayList assemblies) { log.Info("Initializing ActiveRecord Framework"); ActiveRecordStarter.ResetInitializationFlag(); ActiveRecordStarter.SessionFactoryHolderCreated += new SessionFactoryHolderDelegate(OnSessionFactoryHolderCreated); try { ConfigurationSourceAdapter adapter = new ConfigurationSourceAdapter(FacilityConfig); if (log.IsDebugEnabled) { log.Debug("Is Debug enabled {0}", adapter.Debug); log.Debug("ThreadScopeInfo {0}", adapter.ThreadScopeInfoImplementation); log.Debug("NamingStrategy {0}", adapter.NamingStrategyImplementation); log.Debug("SessionFactoryHolder {0}", adapter.SessionFactoryHolderImplementation); } ActiveRecordStarter.Initialize( (Assembly[])assemblies.ToArray(typeof(Assembly)), adapter); } finally { ActiveRecordStarter.SessionFactoryHolderCreated -= new SessionFactoryHolderDelegate(OnSessionFactoryHolderCreated); } }
private void InitializeFramework(ArrayList assemblies) { log.Info("Initializing ActiveRecord Framework"); ActiveRecordStarter.ResetInitializationFlag(); ActiveRecordStarter.SessionFactoryHolderCreated += new SessionFactoryHolderDelegate(OnSessionFactoryHolderCreated); try { ConfigurationSourceAdapter adapter = new ConfigurationSourceAdapter(FacilityConfig); if (log.IsDebugEnabled) { log.Debug("Is Debug enabled {0}", adapter.Debug); log.Debug("ThreadScopeInfo {0}", adapter.ThreadScopeInfoImplementation); log.Debug("NamingStrategy {0}", adapter.NamingStrategyImplementation); log.Debug("SessionFactoryHolder {0}", adapter.SessionFactoryHolderImplementation); } ActiveRecordStarter.Initialize( (Assembly[]) assemblies.ToArray(typeof(Assembly)), adapter); } finally { ActiveRecordStarter.SessionFactoryHolderCreated -= new SessionFactoryHolderDelegate(OnSessionFactoryHolderCreated); } }