ACR_ServerCommunicator.GameWorldConfiguration.ReadConfigurationFromDatabase C# (CSharp) Метод

ReadConfigurationFromDatabase() публичный Метод

This method reads the current configuration data from the database.
public ReadConfigurationFromDatabase ( IALFADatabase Database ) : void
Database IALFADatabase Supplies the database connection.
Результат void
        public void ReadConfigurationFromDatabase(IALFADatabase Database)
        {
            Database.ACR_SQLQuery("SELECT `variable`, `value` FROM `config`");

            while (Database.ACR_SQLFetch())
            {
                string VarName = Database.ACR_SQLGetData(0);
                string VarValue = Database.ACR_SQLGetData(1);

                if (VarName == "PlayerPassword")
                    PlayerPassword = VarValue;
                else if (VarName == "RestartWatchdogTimeout")
                    RestartWatchdogTimeout = Convert.ToInt32(VarValue);
                else if (VarName == "AccountAssociationSecret")
                    AccountAssociationSecret = VarValue;
                else if (VarName == "AccountAssociationUrl")
                    AccountAssociationUrl = VarValue;
                else if (VarName == "GetHostnameUrl")
                    GetHostnameUrl = VarValue;
                else if (VarName == "DefaultIrcGatewayId")
                    DefaultIrcGatewayId = Convert.ToInt32(VarValue);
                else if (VarName == "DefaultIrcRecipient")
                    DefaultIrcRecipient = VarValue;
                else if (VarName == "ErrorNotifyIrcRecipient")
                    ErrorNotifyIrcRecipient = VarValue;
                else if (VarName == "DisableSaveInQuarantine")
                    DisableSaveInQuarantine = Convert.ToInt32(VarValue) != 0;
                else if (VarName == "ProtectionLevel")
                    ProtectionLevel = (MemberProtectionLevel)Convert.ToInt32(VarValue);
                else if (VarName == "VaultConnectionString")
                    VaultConnectionString = VarValue;
                else if (VarName == "UpdaterConnectionString")
                    UpdaterConnectionString = VarValue;
                else if (VarName == "VerboseVaultLogging")
                    VerboseVaultLogging = Convert.ToInt32(VarValue) != 0;
            }
        }