mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Fix namespaces for code moved to separate class libraries (#263)
* Create ServiceHost a service-specific class * Renaming hosting namespace * Rename credentials namespace * Fix namespaces
This commit is contained in:
@@ -9,9 +9,9 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
|
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ using System;
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.JsonRpc.Driver
|
namespace Microsoft.SqlTools.JsonRpc.Driver
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.JsonRpc.Driver;
|
using Microsoft.SqlTools.JsonRpc.Driver;
|
||||||
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Contracts
|
namespace Microsoft.SqlTools.Credentials.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A Credential containing information needed to log into a resource. This is primarily
|
/// A Credential containing information needed to log into a resource. This is primarily
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Linux;
|
using Microsoft.SqlTools.Credentials.Linux;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.OSX;
|
using Microsoft.SqlTools.Credentials.OSX;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Win32;
|
using Microsoft.SqlTools.Credentials.Win32;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Service responsible for securing credentials in a platform-neutral manner. This provides
|
/// Service responsible for securing credentials in a platform-neutral manner. This provides
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An <see cref="ICredentialStore"/> support securely saving and retrieving passwords
|
/// An <see cref="ICredentialStore"/> support securely saving and retrieving passwords
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
internal static class InteropUtils
|
internal static class InteropUtils
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Linux
|
namespace Microsoft.SqlTools.Credentials.Linux
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simplified class to enable writing a set of credentials to/from disk
|
/// Simplified class to enable writing a set of credentials to/from disk
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Linux
|
namespace Microsoft.SqlTools.Credentials.Linux
|
||||||
{
|
{
|
||||||
|
|
||||||
#if !WINDOWS_ONLY_BUILD
|
#if !WINDOWS_ONLY_BUILD
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
|
|
||||||
#if !WINDOWS_ONLY_BUILD
|
#if !WINDOWS_ONLY_BUILD
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
|
|
||||||
#if !WINDOWS_ONLY_BUILD
|
#if !WINDOWS_ONLY_BUILD
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Linux
|
namespace Microsoft.SqlTools.Credentials.Linux
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Store configuration struct
|
/// Store configuration struct
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
internal static partial class Interop
|
internal static partial class Interop
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
internal static partial class Interop
|
internal static partial class Interop
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
internal partial class Interop
|
internal partial class Interop
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.OSX
|
namespace Microsoft.SqlTools.Credentials.OSX
|
||||||
{
|
{
|
||||||
|
|
||||||
#if !WINDOWS_ONLY_BUILD
|
#if !WINDOWS_ONLY_BUILD
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
internal static class SecureStringHelper
|
internal static class SecureStringHelper
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials.Win32
|
||||||
{
|
{
|
||||||
public class CredentialSet: List<Win32Credential>, IDisposable
|
public class CredentialSet: List<Win32Credential>, IDisposable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the Apache License 2.0
|
// Licensed under the Apache License 2.0
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials.Win32
|
||||||
{
|
{
|
||||||
public enum CredentialType: uint
|
public enum CredentialType: uint
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,9 +6,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.SqlTools.Credentials;
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials.Win32
|
||||||
{
|
{
|
||||||
internal class NativeMethods
|
internal class NativeMethods
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the Apache License 2.0
|
// Licensed under the Apache License 2.0
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials.Win32
|
||||||
{
|
{
|
||||||
public enum PersistanceType : uint
|
public enum PersistanceType : uint
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ using System;
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.SqlTools.Credentials;
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials.Win32
|
||||||
{
|
{
|
||||||
public class Win32Credential: IDisposable
|
public class Win32Credential: IDisposable
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials.Contracts;
|
using Microsoft.SqlTools.Credentials.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Credentials.Win32
|
namespace Microsoft.SqlTools.Credentials.Win32
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Win32 implementation of the credential store
|
/// Win32 implementation of the credential store
|
||||||
|
|||||||
175
src/Microsoft.SqlTools.Credentials/CredentialsServiceHost.cs
Normal file
175
src/Microsoft.SqlTools.Credentials/CredentialsServiceHost.cs
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) Microsoft. All rights reserved.
|
||||||
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
//
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.SqlTools.Hosting;
|
||||||
|
using Microsoft.SqlTools.Hosting.Contracts;
|
||||||
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
|
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||||
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
|
namespace Microsoft.SqlTools.Credentials
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// SQL Tools Credentials Service request handler. Provides the entire JSON RPC
|
||||||
|
/// implementation for sending/receiving JSON requests and dispatching the requests to
|
||||||
|
/// handlers that are registered prior to startup.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class CredentialsServiceHost : ServiceHostBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// This timeout limits the amount of time that shutdown tasks can take to complete
|
||||||
|
/// prior to the process shutting down.
|
||||||
|
/// </summary>
|
||||||
|
private const int ShutdownTimeoutInSeconds = 120;
|
||||||
|
|
||||||
|
#region Singleton Instance Code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Singleton instance of the service host for internal storage
|
||||||
|
/// </summary>
|
||||||
|
private static readonly Lazy<CredentialsServiceHost> instance = new Lazy<CredentialsServiceHost>(() => new CredentialsServiceHost());
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Current instance of the ServiceHost
|
||||||
|
/// </summary>
|
||||||
|
public static CredentialsServiceHost Instance
|
||||||
|
{
|
||||||
|
get { return instance.Value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Constructs new instance of ServiceHost using the host and profile details provided.
|
||||||
|
/// Access is private to ensure only one instance exists at a time.
|
||||||
|
/// </summary>
|
||||||
|
private CredentialsServiceHost() : base(new StdioServerChannel())
|
||||||
|
{
|
||||||
|
// Initialize the shutdown activities
|
||||||
|
shutdownCallbacks = new List<ShutdownCallback>();
|
||||||
|
initializeCallbacks = new List<InitializeCallback>();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provide initialization that must occur after the service host is started
|
||||||
|
/// </summary>
|
||||||
|
public void InitializeRequestHandlers()
|
||||||
|
{
|
||||||
|
// Register the requests that this service host will handle
|
||||||
|
this.SetRequestHandler(InitializeRequest.Type, this.HandleInitializeRequest);
|
||||||
|
this.SetRequestHandler(ShutdownRequest.Type, this.HandleShutdownRequest);
|
||||||
|
this.SetRequestHandler(VersionRequest.Type, HandleVersionRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Member Variables
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delegate definition for the host shutdown event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="shutdownParams"></param>
|
||||||
|
/// <param name="shutdownRequestContext"></param>
|
||||||
|
public delegate Task ShutdownCallback(object shutdownParams, RequestContext<object> shutdownRequestContext);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Delegate definition for the host initialization event
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="startupParams"></param>
|
||||||
|
/// <param name="requestContext"></param>
|
||||||
|
public delegate Task InitializeCallback(InitializeRequest startupParams, RequestContext<InitializeResult> requestContext);
|
||||||
|
|
||||||
|
private readonly List<ShutdownCallback> shutdownCallbacks;
|
||||||
|
|
||||||
|
private readonly List<InitializeCallback> initializeCallbacks;
|
||||||
|
|
||||||
|
private static readonly Version serviceVersion = Assembly.GetEntryAssembly().GetName().Version;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Public Methods
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new callback to be called when the shutdown request is submitted
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="callback">Callback to perform when a shutdown request is submitted</param>
|
||||||
|
public void RegisterShutdownTask(ShutdownCallback callback)
|
||||||
|
{
|
||||||
|
shutdownCallbacks.Add(callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Add a new method to be called when the initialize request is submitted
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="callback">Callback to perform when an initialize request is submitted</param>
|
||||||
|
public void RegisterInitializeTask(InitializeCallback callback)
|
||||||
|
{
|
||||||
|
initializeCallbacks.Add(callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Request Handlers
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the shutdown event for the Language Server
|
||||||
|
/// </summary>
|
||||||
|
private async Task HandleShutdownRequest(object shutdownParams, RequestContext<object> requestContext)
|
||||||
|
{
|
||||||
|
Logger.Write(LogLevel.Normal, "Service host is shutting down...");
|
||||||
|
|
||||||
|
// Call all the shutdown methods provided by the service components
|
||||||
|
Task[] shutdownTasks = shutdownCallbacks.Select(t => t(shutdownParams, requestContext)).ToArray();
|
||||||
|
TimeSpan shutdownTimeout = TimeSpan.FromSeconds(ShutdownTimeoutInSeconds);
|
||||||
|
// shut down once all tasks are completed, or after the timeout expires, whichever comes first.
|
||||||
|
await Task.WhenAny(Task.WhenAll(shutdownTasks), Task.Delay(shutdownTimeout)).ContinueWith(t => Environment.Exit(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the initialization request
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="initializeParams"></param>
|
||||||
|
/// <param name="requestContext"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
internal async Task HandleInitializeRequest(InitializeRequest initializeParams, RequestContext<InitializeResult> requestContext)
|
||||||
|
{
|
||||||
|
// Call all tasks that registered on the initialize request
|
||||||
|
var initializeTasks = initializeCallbacks.Select(t => t(initializeParams, requestContext));
|
||||||
|
await Task.WhenAll(initializeTasks);
|
||||||
|
|
||||||
|
// TODO: Figure out where this needs to go to be agnostic of the language
|
||||||
|
|
||||||
|
// Send back what this server can do
|
||||||
|
await requestContext.SendResult(
|
||||||
|
new InitializeResult
|
||||||
|
{
|
||||||
|
Capabilities = new ServerCapabilities
|
||||||
|
{
|
||||||
|
DefinitionProvider = false,
|
||||||
|
ReferencesProvider = false,
|
||||||
|
DocumentFormattingProvider = false,
|
||||||
|
DocumentRangeFormattingProvider = false,
|
||||||
|
DocumentHighlightProvider = false,
|
||||||
|
HoverProvider = false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the version request. Sends back the server version as result.
|
||||||
|
/// </summary>
|
||||||
|
private static async Task HandleVersionRequest(
|
||||||
|
object versionRequestParams,
|
||||||
|
RequestContext<string> requestContext)
|
||||||
|
{
|
||||||
|
await requestContext.SendResult(serviceVersion.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,14 +2,9 @@
|
|||||||
// Copyright (c) Microsoft. All rights reserved.
|
// Copyright (c) Microsoft. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using System;
|
using Microsoft.SqlTools.Extensibility;
|
||||||
using System.Collections.Generic;
|
using Microsoft.SqlTools.Hosting;
|
||||||
using System.Linq;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Credentials;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Extensibility;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
@@ -23,9 +18,9 @@ namespace Microsoft.SqlTools.Credentials
|
|||||||
private static object lockObject = new object();
|
private static object lockObject = new object();
|
||||||
private static bool isLoaded;
|
private static bool isLoaded;
|
||||||
|
|
||||||
internal static ServiceHost CreateAndStartServiceHost(SqlToolsContext sqlToolsContext)
|
internal static CredentialsServiceHost CreateAndStartServiceHost(SqlToolsContext sqlToolsContext)
|
||||||
{
|
{
|
||||||
ServiceHost serviceHost = ServiceHost.Instance;
|
CredentialsServiceHost serviceHost = CredentialsServiceHost.Instance;
|
||||||
lock (lockObject)
|
lock (lockObject)
|
||||||
{
|
{
|
||||||
if (!isLoaded)
|
if (!isLoaded)
|
||||||
@@ -45,7 +40,7 @@ namespace Microsoft.SqlTools.Credentials
|
|||||||
return serviceHost;
|
return serviceHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void InitializeRequestHandlersAndServices(ServiceHost serviceHost, SqlToolsContext sqlToolsContext)
|
private static void InitializeRequestHandlersAndServices(CredentialsServiceHost serviceHost, SqlToolsContext sqlToolsContext)
|
||||||
{
|
{
|
||||||
// Load extension provider, which currently finds all exports in current DLL. Can be changed to find based
|
// Load extension provider, which currently finds all exports in current DLL. Can be changed to find based
|
||||||
// on directory or assembly list quite easily in the future
|
// on directory or assembly list quite easily in the future
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.SqlTools.Credentials.Utility;
|
using Microsoft.SqlTools.Credentials.Utility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.Credentials
|
namespace Microsoft.SqlTools.Credentials
|
||||||
{
|
{
|
||||||
@@ -39,7 +38,7 @@ namespace Microsoft.SqlTools.Credentials
|
|||||||
version: new Version(1, 0));
|
version: new Version(1, 0));
|
||||||
|
|
||||||
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails);
|
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails);
|
||||||
ServiceHost serviceHost = HostLoader.CreateAndStartServiceHost(sqlToolsContext);
|
CredentialsServiceHost serviceHost = HostLoader.CreateAndStartServiceHost(sqlToolsContext);
|
||||||
|
|
||||||
serviceHost.WaitForExit();
|
serviceHost.WaitForExit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.Loader;
|
using System.Runtime.Loader;
|
||||||
using Microsoft.Extensions.DependencyModel;
|
using Microsoft.Extensions.DependencyModel;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Extensibility
|
namespace Microsoft.SqlTools.Extensibility
|
||||||
{
|
{
|
||||||
public class ExtensionServiceProvider : RegisteredServiceProvider
|
public class ExtensionServiceProvider : RegisteredServiceProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Extensibility
|
namespace Microsoft.SqlTools.Extensibility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A Service that expects to lookup other services. Using this interface on an exported service
|
/// A Service that expects to lookup other services. Using this interface on an exported service
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Extensibility
|
namespace Microsoft.SqlTools.Extensibility
|
||||||
{
|
{
|
||||||
|
|
||||||
internal static class IEnumerableExt
|
internal static class IEnumerableExt
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Extensibility
|
namespace Microsoft.SqlTools.Extensibility
|
||||||
{
|
{
|
||||||
public interface IMultiServiceProvider
|
public interface IMultiServiceProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ using System.Globalization;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.SqlTools.Hosting;
|
using Microsoft.SqlTools.Hosting;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Extensibility
|
namespace Microsoft.SqlTools.Extensibility
|
||||||
{
|
{
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a class that describes the capabilities of a language
|
/// Defines a class that describes the capabilities of a language
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
//
|
||||||
|
// Copyright (c) Microsoft. All rights reserved.
|
||||||
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
//
|
||||||
|
|
||||||
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
|
{
|
||||||
|
public class DmpServerCapabilities
|
||||||
|
{
|
||||||
|
public string ProviderName { get; set;
|
||||||
|
}
|
||||||
|
public bool? HoverProvider { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parameters to be used for reporting hosting-level errors, such as protocol violations
|
/// Parameters to be used for reporting hosting-level errors, such as protocol violations
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
{
|
{
|
||||||
public class InitializeRequest
|
public class InitializeRequest
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
{
|
{
|
||||||
public class ServerCapabilities
|
public class ServerCapabilities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a message that is sent from the client to request
|
/// Defines a message that is sent from the client to request
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Contracts
|
namespace Microsoft.SqlTools.Hosting.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a message that is sent from the client to request
|
/// Defines a message that is sent from the client to request
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Extensibility;
|
using Microsoft.SqlTools.Extensibility;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting
|
namespace Microsoft.SqlTools.Hosting
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a hosted service that communicates with external processes via
|
/// Defines a hosted service that communicates with external processes via
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
using Microsoft.SqlTools.Hosting.Protocol.Serializers;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
|
namespace Microsoft.SqlTools.Hosting.Protocol.Channel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a base implementation for servers and their clients over a
|
/// Defines a base implementation for servers and their clients over a
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ using System.Diagnostics;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
using Microsoft.SqlTools.Hosting.Protocol.Serializers;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
|
namespace Microsoft.SqlTools.Hosting.Protocol.Channel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a client implementation for the standard I/O channel.
|
/// Provides a client implementation for the standard I/O channel.
|
||||||
|
|||||||
@@ -6,9 +6,9 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
using Microsoft.SqlTools.Hosting.Protocol.Serializers;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel
|
namespace Microsoft.SqlTools.Hosting.Protocol.Channel
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a server implementation for the standard I/O channel.
|
/// Provides a server implementation for the standard I/O channel.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public static class Constants
|
public static class Constants
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
|
namespace Microsoft.SqlTools.Hosting.Protocol.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines an event type with a particular method name.
|
/// Defines an event type with a particular method name.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
|
namespace Microsoft.SqlTools.Hosting.Protocol.Contracts
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines all possible message types.
|
/// Defines all possible message types.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts
|
namespace Microsoft.SqlTools.Hosting.Protocol.Contracts
|
||||||
{
|
{
|
||||||
[DebuggerDisplay("RequestType MethodName = {MethodName}")]
|
[DebuggerDisplay("RequestType MethodName = {MethodName}")]
|
||||||
public class RequestType<TParams, TResult>
|
public class RequestType<TParams, TResult>
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides context for a received event so that handlers
|
/// Provides context for a received event so that handlers
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public interface IEventSender
|
public interface IEventSender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A ProtocolEndpoint is used for inter-process communication. Services can register to
|
/// A ProtocolEndpoint is used for inter-process communication. Services can register to
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public interface IRequestSender
|
public interface IRequestSender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,12 +8,12 @@ using System.Collections.Generic;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Contracts;
|
using Microsoft.SqlTools.Hosting.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageDispatcher
|
public class MessageDispatcher
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageParseException : Exception
|
public class MessageParseException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the possible message protocol types.
|
/// Defines the possible message protocol types.
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ using System.IO;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.Hosting;
|
using Microsoft.SqlTools.Hosting;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
using Microsoft.SqlTools.Hosting.Protocol.Serializers;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageReader
|
public class MessageReader
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers;
|
using Microsoft.SqlTools.Hosting.Protocol.Serializers;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class MessageWriter
|
public class MessageWriter
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides behavior for a client or server endpoint that
|
/// Provides behavior for a client or server endpoint that
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol
|
namespace Microsoft.SqlTools.Hosting.Protocol
|
||||||
{
|
{
|
||||||
public class RequestContext<TResult> : IEventSender
|
public class RequestContext<TResult> : IEventSender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
|
namespace Microsoft.SqlTools.Hosting.Protocol.Serializers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines a common interface for message serializers.
|
/// Defines a common interface for message serializers.
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
|
namespace Microsoft.SqlTools.Hosting.Protocol.Serializers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serializes messages in the JSON RPC format. Used primarily
|
/// Serializes messages in the JSON RPC format. Used primarily
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Contracts;
|
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Serializers
|
namespace Microsoft.SqlTools.Hosting.Protocol.Serializers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Serializes messages in the V8 format. Used primarily for debug adapters.
|
/// Serializes messages in the V8 format. Used primarily for debug adapters.
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Contracts;
|
using Microsoft.SqlTools.Hosting.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol.Channel;
|
using Microsoft.SqlTools.Hosting.Protocol.Channel;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Hosting
|
namespace Microsoft.SqlTools.Hosting
|
||||||
{
|
{
|
||||||
public abstract class ServiceHostBase : ProtocolEndpoint
|
public abstract class ServiceHostBase : ProtocolEndpoint
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
#if false
|
#if false
|
||||||
using Microsoft.SqlTools.EditorServices.Extensions;
|
using Microsoft.SqlTools.Extensions;
|
||||||
using Microsoft.SqlTools.EditorServices.Protocol.LanguageServer;
|
using Microsoft.SqlTools.Protocol.LanguageServer;
|
||||||
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
|
using Microsoft.SqlTools.Protocol.MessageProtocol;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.EditorServices.Protocol.Server
|
namespace Microsoft.SqlTools.Protocol.Server
|
||||||
{
|
{
|
||||||
internal class LanguageServerEditorOperations : IEditorOperations
|
internal class LanguageServerEditorOperations : IEditorOperations
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Simplifies the setup of a SynchronizationContext for the use
|
/// Simplifies the setup of a SynchronizationContext for the use
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a simplified interface for creating a new thread
|
/// Provides a simplified interface for creating a new thread
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a simple wrapper over a SemaphoreSlim to allow
|
/// Provides a simple wrapper over a SemaphoreSlim to allow
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Linq;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a synchronized queue which can be used from within async
|
/// Provides a synchronized queue which can be used from within async
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
public static class ObjectExtensions
|
public static class ObjectExtensions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ using System.IO;
|
|||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the level indicators for log messages.
|
/// Defines the level indicators for log messages.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Collection class that permits storage of over <c>int.MaxValue</c> items. This is performed
|
/// Collection class that permits storage of over <c>int.MaxValue</c> items. This is performed
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
public static class TextUtilities
|
public static class TextUtilities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides a SynchronizationContext implementation that can be used
|
/// Provides a SynchronizationContext implementation that can be used
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Utility
|
namespace Microsoft.SqlTools.Utility
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides common validation methods to simplify method
|
/// Provides common validation methods to simplify method
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
//
|
//
|
||||||
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.Diagnostics;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
namespace Microsoft.SqlTools.ServiceLayer.BatchParser.ExecutionEngineCode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ using System;
|
|||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data.Common;
|
using System.Data.Common;
|
||||||
using System.Linq;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ using System.Data.SqlClient;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.SqlTools.Hosting.Protocol;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
using Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Hosting.Protocol;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
using Microsoft.SqlTools.ServiceLayer.LanguageServices.Contracts;
|
||||||
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
using Microsoft.SqlTools.ServiceLayer.SqlContext;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
|
||||||
using Microsoft.SqlTools.ServiceLayer.Workspace;
|
using Microsoft.SqlTools.ServiceLayer.Workspace;
|
||||||
using Microsoft.SqlServer.Management.Common;
|
using Microsoft.SqlServer.Management.Common;
|
||||||
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Collections.Concurrent;
|
|||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ using System.Diagnostics;
|
|||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
using Microsoft.SqlServer.Management.Common;
|
using Microsoft.SqlServer.Management.Common;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ using System.Globalization;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ using System.Diagnostics;
|
|||||||
using System.Diagnostics.Contracts;
|
using System.Diagnostics.Contracts;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
using Microsoft.SqlTools.Utility;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
namespace Microsoft.SqlTools.ServiceLayer.Connection.ReliableConnection
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// 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.Hosting.Protocol.Contracts;
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
namespace Microsoft.SqlTools.ServiceLayer.EditData.Contracts
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user