private static Configure UseNHibernateGatewayPersisterInternal(this Configure config, Configuration configuration) { ConfigureNHibernate.ThrowIfRequiredPropertiesAreMissing(configuration.Properties); GatewayPersister.NHibernate.Installer.Installer.RunInstaller = true; ConfigureNHibernate.AddMappings <GatewayMessageMap>(configuration); config.Configurer.ConfigureComponent <GatewayPersister.NHibernate.GatewayPersister>( DependencyLifecycle.SingleInstance) .ConfigureProperty(p => p.SessionFactory, configuration.BuildSessionFactory()); return(config.RunGateway()); }