First major portion of refactor 90%

The overall architecture of the service host is completed here. However,
this doesn't build because the EditorSession dependencies haven't been
worked out just yet.
This commit is contained in:
Benjamin Russell
2016-07-22 11:49:50 -07:00
parent 5d776863d8
commit 85668cb3de
38 changed files with 296 additions and 197 deletions

View File

@@ -2,11 +2,10 @@
// 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 Microsoft.SqlTools.EditorServices.Protocol.Server;
using Microsoft.SqlTools.EditorServices.Session;
using Microsoft.SqlTools.EditorServices.Utility;
namespace Microsoft.SqlTools.ServiceHost
namespace Microsoft.SqlTools.ServiceLayer
{
/// <summary>
/// Main application class for SQL Tools API Service Host executable
@@ -31,10 +30,15 @@ namespace Microsoft.SqlTools.ServiceHost
var hostDetails = new HostDetails(hostName, hostProfileId, hostVersion);
var profilePaths = new ProfilePaths(hostProfileId, "baseAllUsersPath", "baseCurrentUserPath");
// create and run the language server
var languageServer = new LanguageServer(hostDetails, profilePaths);
languageServer.Start().Wait();
languageServer.WaitForExit();
// Create the service host
ServiceHost.ServiceHost serviceHost = ServiceHost.ServiceHost.Create(hostDetails, profilePaths);
// Initialize the services that will be hosted here
LanguageService.LanguageService.Instance.InitializeService(serviceHost);
// Start the service
serviceHost.Start().Wait();
serviceHost.WaitForExit();
}
}
}