static Environment()
		{
			// Computing the version string is a bit expensive, so do it only if logging is enabled.
			if (log.IsInfoEnabled)
			{
				log.Info("NHibernate " + Version);
			}

			GlobalProperties = new Dictionary<string, string>();
			GlobalProperties[PropertyUseReflectionOptimizer] = bool.TrueString;
			LoadGlobalPropertiesFromAppConfig();
			VerifyProperties(GlobalProperties);

			BytecodeProviderInstance = BuildBytecodeProvider(GlobalProperties);
			EnableReflectionOptimizer = PropertiesHelper.GetBoolean(PropertyUseReflectionOptimizer, GlobalProperties);

			if (EnableReflectionOptimizer)
			{
				log.Info("Using reflection optimizer");
			}
		}
Example #2
0
 public static void SetBytecodeProvider(IBytecodeProvider bytecodeProvider) {
     NHibernate.Cfg.Environment.BytecodeProvider = bytecodeProvider;
 }