mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Renaming the classes for the ServiceHost
NOTE: This is a WIP commit, it will not build
This commit is contained in:
@@ -13,24 +13,25 @@ using System.Text;
|
||||
using System.Threading;
|
||||
using System.Linq;
|
||||
using System;
|
||||
using Microsoft.SqlTools.EditorServices;
|
||||
|
||||
namespace Microsoft.SqlTools.EditorServices.Protocol.Server
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
|
||||
{
|
||||
/// <summary>
|
||||
/// SQL Tools VS Code Language Server request handler
|
||||
/// </summary>
|
||||
public class LanguageServer : LanguageServerBase
|
||||
public class ServiceHost : ServiceHostBase
|
||||
{
|
||||
private static CancellationTokenSource existingRequestCancellation;
|
||||
|
||||
private LanguageServerSettings currentSettings = new LanguageServerSettings();
|
||||
private ServiceHostSettings currentSettings = new ServiceHostSettings();
|
||||
|
||||
private EditorSession editorSession;
|
||||
|
||||
/// <param name="hostDetails">
|
||||
/// Provides details about the host application.
|
||||
/// </param>
|
||||
public LanguageServer(HostDetails hostDetails, ProfilePaths profilePaths)
|
||||
public ServiceHost(HostDetails hostDetails, ProfilePaths profilePaths)
|
||||
: base(new StdioServerChannel())
|
||||
{
|
||||
this.editorSession = new EditorSession();
|
||||
|
||||
@@ -8,15 +8,15 @@ using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
|
||||
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Microsoft.SqlTools.EditorServices.Protocol.Server
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
|
||||
{
|
||||
public abstract class LanguageServerBase : ProtocolEndpoint
|
||||
public abstract class ServiceHostBase : ProtocolEndpoint
|
||||
{
|
||||
private bool isStarted;
|
||||
private ChannelBase serverChannel;
|
||||
private TaskCompletionSource<bool> serverExitedTask;
|
||||
|
||||
public LanguageServerBase(ChannelBase serverChannel) :
|
||||
public ServiceHostBase(ChannelBase serverChannel) :
|
||||
base(serverChannel, MessageProtocolType.LanguageServer)
|
||||
{
|
||||
this.serverChannel = serverChannel;
|
||||
|
||||
@@ -6,20 +6,20 @@
|
||||
using System.IO;
|
||||
using Microsoft.SqlTools.EditorServices.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.EditorServices.Protocol.Server
|
||||
namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
|
||||
{
|
||||
public class LanguageServerSettings
|
||||
public class ServiceHostSettings
|
||||
{
|
||||
public bool EnableProfileLoading { get; set; }
|
||||
|
||||
public ScriptAnalysisSettings ScriptAnalysis { get; set; }
|
||||
|
||||
public LanguageServerSettings()
|
||||
public ServiceHostSettings()
|
||||
{
|
||||
this.ScriptAnalysis = new ScriptAnalysisSettings();
|
||||
}
|
||||
|
||||
public void Update(LanguageServerSettings settings, string workspaceRootPath)
|
||||
public void Update(ServiceHostSettings settings, string workspaceRootPath)
|
||||
{
|
||||
if (settings != null)
|
||||
{
|
||||
@@ -85,6 +85,6 @@ namespace Microsoft.SqlTools.EditorServices.Protocol.Server
|
||||
// mode name sent from the client is written as 'SqlTools' and
|
||||
// JSON.net is using camelCasing.
|
||||
|
||||
public LanguageServerSettings SqlTools { get; set; }
|
||||
public ServiceHostSettings SqlTools { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user