private void Parse(XPathNavigator navigator, bool fromAppConfig)
		{
			ParseByteCodeProvider(navigator, fromAppConfig);
			ParseReflectionOptimizer(navigator, fromAppConfig);
			XPathNavigator xpn = navigator.SelectSingleNode(CfgXmlHelper.SessionFactoryExpression);
			if (xpn != null)
			{
				sessionFactory = new SessionFactoryConfiguration(navigator);
			}
			else
			{
				if (!fromAppConfig)
				{
					throw new HibernateConfigException("<session-factory xmlns='" + CfgXmlHelper.CfgSchemaXMLNS +
					"'> element was not found in the configuration file.");
				}
			}
		}
예제 #2
0
        private void Parse(XPathNavigator navigator, bool fromAppConfig)
        {
            ParseByteCodeProvider(navigator, fromAppConfig);
            ParseReflectionOptimizer(navigator, fromAppConfig);
            XPathNavigator xpn = navigator.SelectSingleNode(CfgXmlHelper.SessionFactoryExpression);

            if (xpn != null)
            {
                sessionFactory = new SessionFactoryConfiguration(navigator);
            }
            else
            {
                if (!fromAppConfig)
                {
                    throw new HibernateConfigException("<session-factory xmlns='" + CfgXmlHelper.CfgSchemaXMLNS +
                                                       "'> element was not found in the configuration file.");
                }
            }
        }