public Bootstrapper(ILog _log)
{
if (_log == null)
throw new ArgumentNullException(nameof(_log));
log = _log;
lock(lockObject)
{
if (_sessionFactory != null)
{
log.Error("Do not instantiate bootstrapper twice!");
throw new InvalidOperationException("Do not instantiate bootstrapper twice!");
}
_sessionFactory = CreateSessionFactory();
if (_sessionFactory == null)
{
log.Error("Could not instantiate sessionFactory?");
throw new InvalidOperationException("Could not instantiate sessionFactory?");
}
}
}