Renaming the classes for the ServiceHost

NOTE: This is a WIP commit, it will not build
This commit is contained in:
Benjamin Russell
2016-07-21 12:00:53 -07:00
parent 1b592aeaef
commit 9edeb19946
3 changed files with 13 additions and 12 deletions

View File

@@ -13,24 +13,25 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Linq; using System.Linq;
using System; using System;
using Microsoft.SqlTools.EditorServices;
namespace Microsoft.SqlTools.EditorServices.Protocol.Server namespace Microsoft.SqlTools.ServiceLayer.ServiceHost
{ {
/// <summary> /// <summary>
/// SQL Tools VS Code Language Server request handler /// SQL Tools VS Code Language Server request handler
/// </summary> /// </summary>
public class LanguageServer : LanguageServerBase public class ServiceHost : ServiceHostBase
{ {
private static CancellationTokenSource existingRequestCancellation; private static CancellationTokenSource existingRequestCancellation;
private LanguageServerSettings currentSettings = new LanguageServerSettings(); private ServiceHostSettings currentSettings = new ServiceHostSettings();
private EditorSession editorSession; private EditorSession editorSession;
/// <param name="hostDetails"> /// <param name="hostDetails">
/// Provides details about the host application. /// Provides details about the host application.
/// </param> /// </param>
public LanguageServer(HostDetails hostDetails, ProfilePaths profilePaths) public ServiceHost(HostDetails hostDetails, ProfilePaths profilePaths)
: base(new StdioServerChannel()) : base(new StdioServerChannel())
{ {
this.editorSession = new EditorSession(); this.editorSession = new EditorSession();

View File

@@ -8,15 +8,15 @@ using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol;
using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel;
using System.Threading.Tasks; 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 bool isStarted;
private ChannelBase serverChannel; private ChannelBase serverChannel;
private TaskCompletionSource<bool> serverExitedTask; private TaskCompletionSource<bool> serverExitedTask;
public LanguageServerBase(ChannelBase serverChannel) : public ServiceHostBase(ChannelBase serverChannel) :
base(serverChannel, MessageProtocolType.LanguageServer) base(serverChannel, MessageProtocolType.LanguageServer)
{ {
this.serverChannel = serverChannel; this.serverChannel = serverChannel;

View File

@@ -6,20 +6,20 @@
using System.IO; using System.IO;
using Microsoft.SqlTools.EditorServices.Utility; 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 bool EnableProfileLoading { get; set; }
public ScriptAnalysisSettings ScriptAnalysis { get; set; } public ScriptAnalysisSettings ScriptAnalysis { get; set; }
public LanguageServerSettings() public ServiceHostSettings()
{ {
this.ScriptAnalysis = new ScriptAnalysisSettings(); this.ScriptAnalysis = new ScriptAnalysisSettings();
} }
public void Update(LanguageServerSettings settings, string workspaceRootPath) public void Update(ServiceHostSettings settings, string workspaceRootPath)
{ {
if (settings != null) if (settings != null)
{ {
@@ -85,6 +85,6 @@ namespace Microsoft.SqlTools.EditorServices.Protocol.Server
// mode name sent from the client is written as 'SqlTools' and // mode name sent from the client is written as 'SqlTools' and
// JSON.net is using camelCasing. // JSON.net is using camelCasing.
public LanguageServerSettings SqlTools { get; set; } public ServiceHostSettings SqlTools { get; set; }
} }
} }