internal static ScriptFileMarker FromDiagnosticRecord(
            DiagnosticRecord diagnosticRecord)
        {
            Validate.IsNotNull("diagnosticRecord", diagnosticRecord);

            return new ScriptFileMarker
            {
                Message = diagnosticRecord.Message,
                Level = GetMarkerLevelFromDiagnosticSeverity(diagnosticRecord.Severity),
                ScriptRegion = ScriptRegion.Create(diagnosticRecord.Extent)
            };
        }
 /// <summary>
 /// Creates a suppressed record based on a diagnostic record and the rule suppression
 /// </summary>
 /// <param name="record"></param>
 /// <param name="Suppression"></param>
 public SuppressedRecord(DiagnosticRecord record, IReadOnlyList <RuleSuppression> suppressions)
 {
     Suppression  = new ReadOnlyCollection <RuleSuppression>(new List <RuleSuppression>(suppressions));
     IsSuppressed = true;
     if (record != null)
     {
         RuleName          = record.RuleName;
         Message           = record.Message;
         Extent            = record.Extent;
         Severity          = record.Severity;
         ScriptPath        = record.ScriptPath;
         RuleSuppressionID = record.RuleSuppressionID;
     }
 }