bool ValidateEnum( string key, string value, params string[] options ) {
for( int i = 0; i < options.Length; i++ ) {
if( value.ToLowerInvariant() == options[i].ToLowerInvariant() ) {
settings[key] = options[i];
return true;
}
}
Log( "Config.SetValue: Invalid option specified for {0}. " +
"See documentation for the list of permitted options. Using default: {1}", LogType.Warning,
key, settings[key] );
return false;
}