示例#1
0
		static SessionFactoryEntry toSessionFactoryEntry(SessionFactoryRegistration sessionFactoryRegistration)
		{
			return new SessionFactoryEntry(
				sessionFactoryRegistration.SessionFactoryKey,
				sessionFactoryRegistration.GetConfiguration().BuildSessionFactory,
				sessionFactoryRegistration.SessionFactoryInitializationMode,
				sessionFactoryRegistration.OnSessionFactoryInitialized,
				sessionFactoryRegistration.OnSessionOpened,
				sessionFactoryRegistration.OnSessionFactoryThreadedInitializationException);
		}
示例#2
0
		public ICompleteConfiguration RegisterSessionFactory(string sessionFactoryKey)
		{
			_currentSessionFactoryRegistration.SessionFactoryKey = sessionFactoryKey;
			_sessionFactoryRegistrations.Add(_currentSessionFactoryRegistration);
			_currentSessionFactoryRegistration = new SessionFactoryRegistration
			{
				Configuration = _currentSessionFactoryRegistration.Configuration,
				ConfigurationCache = _currentSessionFactoryRegistration.ConfigurationCache,
				CacheDependencyFilePaths = _currentSessionFactoryRegistration.CacheDependencyFilePaths,
				SessionFactoryInitializationMode = _currentSessionFactoryRegistration.SessionFactoryInitializationMode,
				OnSessionFactoryThreadedInitializationException = _currentSessionFactoryRegistration.OnSessionFactoryThreadedInitializationException,
				OnSessionFactoryInitialized = _currentSessionFactoryRegistration.OnSessionFactoryInitialized,
				OnSessionOpened = _currentSessionFactoryRegistration.OnSessionOpened
			};
			return this;
		}