// // 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.DataProtocol.Contracts.Utilities; namespace Microsoft.SqlTools.DataProtocol.Contracts.ServerCapabilities { public enum TextDocumentSyncKind { None = 0, Full = 1, Incremental = 2 } /// /// Defines options for sae notifications /// public class TextDocumentSaveOptions { /// /// Whether the client should send the content of the file being saved with the save notification /// public bool? IncludeText { get; set; } } public class TextDocumentSync : Union { public static TextDocumentSync FromTextDocumentSyncKind(TextDocumentSyncKind value) { return new TextDocumentSync { value1 = null, value2 = value }; } public static TextDocumentSync FromTextDocumentSyncOptions(TextDocumentSyncOptions value) { return new TextDocumentSync { value1 = value, value2 = null }; } } public class TextDocumentSyncOptions { /// /// What kind of change notifications are sent to the server /// public TextDocumentSyncKind? Change { get; set; } /// /// Whether open and close notifications are sent to the server /// public bool? OpenClose { get; set; } /// /// Options for save notifications /// public TextDocumentSaveOptions SaveOptions { get; set; } /// /// Whether notifications indicating the client will save are sent to the server /// public bool? WillSave { get; set; } /// /// Whether requests should be sent to the server when the client is about to save /// public bool? WillSaveWaitUntil { get; set; } } }