Use the ToString() function directly for enum-to-string conversions

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2015-09-15 13:55:18 +01:00
parent fc75ceb4ce
commit 2766a18987
2 changed files with 1 additions and 6 deletions

View File

@ -83,7 +83,7 @@ namespace XenAdmin.Actions
var analysisResult = GetAnalysisResult(diagnosticToken, Pool.HealthCheckSettings.UploadUuid);
log.Info("Saving analysis result");
Dictionary<string, string> newConfig = Pool.health_check_config;
newConfig[HealthCheckSettings.REPORT_ANALYSIS_SEVERITY] = HealthCheckSettings.DiagnosticAlertSeverityToString(GetMaxSeverity(analysisResult));
newConfig[HealthCheckSettings.REPORT_ANALYSIS_SEVERITY] = GetMaxSeverity(analysisResult).ToString();
newConfig[HealthCheckSettings.REPORT_ANALYSIS_ISSUES_DETECTED] = analysisResult.Count.ToString();
newConfig[HealthCheckSettings.REPORT_ANALYSIS_UPLOAD_UUID] = Pool.HealthCheckSettings.UploadUuid;
newConfig[HealthCheckSettings.REPORT_ANALYSIS_UPLOAD_TIME] = Pool.HealthCheckSettings.LastSuccessfulUpload;

View File

@ -382,10 +382,5 @@ namespace XenAdmin.Model
return result;
return DiagnosticAlertSeverity.Info;
}
internal static string DiagnosticAlertSeverityToString(DiagnosticAlertSeverity severity)
{
return severity.ToString();
}
}
}