Ejemplo n.º 1
0
 private DiagnosticResult AppendSpan(FileLinePositionSpan span, DiagnosticLocationOptions options)
 {
     return(new DiagnosticResult(
                spans: Spans.Add(new DiagnosticLocation(span, options)),
                suppressMessage: _suppressMessage,
                message: _message,
                severity: Severity,
                id: Id,
                messageFormat: MessageFormat,
                messageArguments: MessageArguments));
 }
 private DiagnosticResult AppendSpan(FileLinePositionSpan span, DiagnosticLocationOptions options)
 {
     return(new DiagnosticResult(
                Spans.Add(new DiagnosticLocation(span, options)),
                _suppressMessage,
                _message,
                Severity,
                Id,
                MessageFormat,
                MessageArguments,
                SuppressedId));
 }
Ejemplo n.º 3
0
 public DiagnosticResult WithLocation(int markupKey, DiagnosticLocationOptions options)
 => AppendSpan(new FileLinePositionSpan(string.Empty, new LinePosition(0, markupKey), new LinePosition(0, markupKey)), options | DiagnosticLocationOptions.InterpretAsMarkupKey);
Ejemplo n.º 4
0
 public DiagnosticResult WithSpan(FileLinePositionSpan span, DiagnosticLocationOptions options)
 => AppendSpan(span, options);
Ejemplo n.º 5
0
 public DiagnosticResult WithLocation(string path, LinePosition location, DiagnosticLocationOptions options)
 => AppendSpan(new FileLinePositionSpan(path, location, location), options | DiagnosticLocationOptions.IgnoreLength);
 /// <summary>
 /// Initializes a new instance of the <see cref="DiagnosticLocation"/> structure with the specified location and
 /// options.
 /// </summary>
 /// <param name="span">The location of the diagnostic.</param>
 /// <param name="options">The options to consider when validating this location.</param>
 public DiagnosticLocation(FileLinePositionSpan span, DiagnosticLocationOptions options)
 {
     Span    = span;
     Options = options;
 }