mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
My mistake, didn't pay enough attention when performing the refactoring as requested in the last code review.
73 lines
2.1 KiB
C#
73 lines
2.1 KiB
C#
//
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
//
|
|
|
|
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
|
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
|
|
|
|
namespace Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts
|
|
{
|
|
public class PublishDiagnosticsNotification
|
|
{
|
|
public static readonly
|
|
EventType<PublishDiagnosticsNotification> Type =
|
|
EventType<PublishDiagnosticsNotification>.Create("textDocument/publishDiagnostics");
|
|
|
|
/// <summary>
|
|
/// Gets or sets the URI for which diagnostic information is reported.
|
|
/// </summary>
|
|
public string Uri { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the array of diagnostic information items.
|
|
/// </summary>
|
|
public Diagnostic[] Diagnostics { get; set; }
|
|
}
|
|
|
|
public enum DiagnosticSeverity
|
|
{
|
|
/// <summary>
|
|
/// Indicates that the diagnostic represents an error.
|
|
/// </summary>
|
|
Error = 1,
|
|
|
|
/// <summary>
|
|
/// Indicates that the diagnostic represents a warning.
|
|
/// </summary>
|
|
Warning = 2,
|
|
|
|
/// <summary>
|
|
/// Indicates that the diagnostic represents an informational message.
|
|
/// </summary>
|
|
Information = 3,
|
|
|
|
/// <summary>
|
|
/// Indicates that the diagnostic represents a hint.
|
|
/// </summary>
|
|
Hint = 4
|
|
}
|
|
|
|
public class Diagnostic
|
|
{
|
|
public Range Range { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the severity of the diagnostic. If omitted, the
|
|
/// client should interpret the severity.
|
|
/// </summary>
|
|
public DiagnosticSeverity? Severity { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the diagnostic's code (optional).
|
|
/// </summary>
|
|
public string Code { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the diagnostic message.
|
|
/// </summary>
|
|
public string Message { get; set; }
|
|
}
|
|
}
|
|
|