// // 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.EditorServices.Protocol.MessageProtocol; namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class PublishDiagnosticsNotification { public static readonly EventType Type = EventType.Create("textDocument/publishDiagnostics"); /// /// Gets or sets the URI for which diagnostic information is reported. /// public string Uri { get; set; } /// /// Gets or sets the array of diagnostic information items. /// public Diagnostic[] Diagnostics { get; set; } } public enum DiagnosticSeverity { /// /// Indicates that the diagnostic represents an error. /// Error = 1, /// /// Indicates that the diagnostic represents a warning. /// Warning = 2, /// /// Indicates that the diagnostic represents an informational message. /// Information = 3, /// /// Indicates that the diagnostic represents a hint. /// Hint = 4 } public class Diagnostic { public Range Range { get; set; } /// /// Gets or sets the severity of the diagnostic. If omitted, the /// client should interpret the severity. /// public DiagnosticSeverity? Severity { get; set; } /// /// Gets or sets the diagnostic's code (optional). /// public string Code { get; set; } /// /// Gets or sets the diagnostic message. /// public string Message { get; set; } } }