public ProcessingResultDiagnostic(Diagnostic diagnostic) { Id = diagnostic.Id; Severity = diagnostic.Severity; Message = diagnostic.GetMessage(); var lineSpan = diagnostic.Location.GetMappedLineSpan(); Start = new ProcessingResultDiagnosticLocation(lineSpan.StartLinePosition); End = new ProcessingResultDiagnosticLocation(lineSpan.EndLinePosition); }