public int CurrentVersion() {
if (this._settings == null && GlobalRegistry.Settings == null)
{
throw new HabaneroArgumentException("SettingsStorer",
"Please set the setting storer before using CurrentVersion as it uses the SettingsStorer to read the current version (VERSION setting)");
}
try
{
return _settings == null
? Convert.ToInt32(GlobalRegistry.Settings.GetString(DatabaseVersionSetting))
: Convert.ToInt32(_settings.GetString(DatabaseVersionSetting));
}
catch (UserException ) {
return 0;
}
}