IdleLandsRedux.DataAccess.Bootstrapper.Bootstrapper C# (CSharp) Method

Bootstrapper() public method

public Bootstrapper ( log4net.ILog _log ) : System
_log log4net.ILog
return System
        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?");
                }
            }
        }