/// <summary> /// Get Diagnoses /// </summary> /// <param name="onlyTopLevelDiagnosisMessages"> whether to parse all diagnoses</param> /// <returns></returns> public MessageDiagnosis[] GetDiagnoses(bool onlyTopLevelDiagnosisMessages = true) { if (onlyTopLevelDiagnosisMessages) { return(monitor.GetMessageData(messageId).Diagnoses); } else { DiagnosisType diagType = monitor.GetDiagnosisTypes(messageId); if (diagType != DiagnosisType.None) { // Get diagnosis from current message and lower level message return(monitor.GetMessageDataWithAllDiagnoses(messageId).Diagnoses); } return(new MessageDiagnosis[0]); } }