public void RegisterBuildListener(ISessionFactoryBuildListener builderListener) { if (builderListener == null) { throw Error.ArgumentNull("builderListener"); } BuildListeners.Add(builderListener); }
/// <summary> /// Initialises the N hibernate with. /// </summary> /// <param name="sessionFactoryBuildListeners">The fluent session factory build listeners.</param> /// <param name="connectionString">The connection string.</param> /// <returns></returns> public ISessionFactoryManager InitialiseNHibernateWith(ISessionFactoryBuildListener[] sessionFactoryBuildListeners, string connectionString) { CreateTestDatabase(connectionString); return new SingleSessionFactoryManager(sessionFactoryBuildListeners.Union(new [] { new MySqlSessionFactoryBuildListener() }), connectionString); }
protected ISessionFactoryManager InitialiseNHibernateWith(ISessionFactoryBuildListener[] sessionFactoryBuildListeners, string connectionString) { NHProfiler.NHProfiler.Enable(); return NHibernateDatabaseTestProvider.InitialiseNHibernateWith(sessionFactoryBuildListeners, connectionString); }
protected ISessionFactoryManager InitialiseNHibernateWith(ISessionFactoryBuildListener[] sessionFactoryBuildListeners) { string connectionString = string.Format(ConfigurationManager.ConnectionStrings[DefaultConnectionStringName].ConnectionString, Guid.NewGuid()); return InitialiseNHibernateWith(sessionFactoryBuildListeners, connectionString); }