Habanero.Faces.Win.HabaneroAppWin.SetupDatabaseConnection C# (CSharp) Method

SetupDatabaseConnection() protected method

Sets up the database connection. If not provided, then reads the connection from the config file.
protected SetupDatabaseConnection ( ) : void
return void
        protected override void SetupDatabaseConnection()
        {
            if (DatabaseConnection.CurrentConnection != null) return;
            if (_databaseConfig == null) _databaseConfig = DatabaseConfig.ReadFromConfigFile();
            string vendor = _databaseConfig.Vendor;
            if (string.IsNullOrEmpty(vendor) || vendor.ToLower().Contains("memory"))
            {
                BORegistry.DataAccessor = new DataAccessorInMemory();
            }
            else
            {
                if (_privateKey != null) _databaseConfig.SetPrivateKey(_privateKey);
                DatabaseConnection.CurrentConnection = _databaseConfig.GetDatabaseConnection();
                BORegistry.DataAccessor = new DataAccessorDB();
            }
        }
        protected override void SetupLogging()