From 42cfb5f4e39754f623bf6d55cc6ec4e3e3554a07 Mon Sep 17 00:00:00 2001 From: Vadim Peretokin Date: Mon, 13 Dec 2021 14:29:30 +0100 Subject: [PATCH] Read java line #'s --- Program.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Program.cs b/Program.cs index 9029420..b6cf72f 100644 --- a/Program.cs +++ b/Program.cs @@ -507,6 +507,17 @@ private List convertIssues(List issues) }; convertedIssues.Add(simplifiedIssue); + // read Java details + var javaLineNumber = issue.GetIntegerExtension("http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line"); + var javaLinePosition = issue.GetIntegerExtension("http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col"); + if (javaLineNumber.HasValue && javaLinePosition.HasValue) + { + simplifiedIssue.LineNumber = javaLineNumber.Value; + simplifiedIssue.LinePosition = javaLinePosition.Value; + continue; + } + + // read .NET details var serializationDetails = GetPositionInfo(issue); if (serializationDetails == null) { @@ -515,6 +526,9 @@ private List convertIssues(List issues) simplifiedIssue.LineNumber = serializationDetails.LineNumber; simplifiedIssue.LinePosition = serializationDetails.LinePosition; + + + } return convertedIssues;