-
Notifications
You must be signed in to change notification settings - Fork 48
/
MarkdownDiagnosticInfo.cs
43 lines (36 loc) · 1.4 KB
/
MarkdownDiagnosticInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace MarkdownLinter;
using Microsoft.VisualStudio.Extensibility.Languages;
using Range = Microsoft.VisualStudio.RpcContracts.Utilities.Range;
/// <summary>
/// Class that contains diagnostic information found by the Markdown linter.
/// Holds information to be converted to a <see cref="DocumentDiagnostic"/>.
/// </summary>
public class MarkdownDiagnosticInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="MarkdownDiagnosticInfo"/> class.
/// </summary>
/// <param name="range">Range where the diagnostic exists.</param>
/// <param name="message">Message to be presented with the diagnostic.</param>
/// <param name="errorCode">Unique error code of this type of diagnostic.</param>
public MarkdownDiagnosticInfo(Range range, string message, string errorCode)
{
this.Range = range;
this.Message = message;
this.ErrorCode = errorCode;
}
/// <summary>
/// Gets the range of the diagnostic.
/// </summary>
public Range Range { get; }
/// <summary>
/// Gets the error message of the diagnostic.
/// </summary>
public string Message { get; }
/// <summary>
/// Gets the error code of the diagnostic.
/// </summary>
public string ErrorCode { get; }
}