The last 10% of the refactor

This will build successfully
This commit is contained in:
Benjamin Russell
2016-07-22 16:41:23 -07:00
parent 85668cb3de
commit b9f041cdf4
11 changed files with 533 additions and 536 deletions

View File

@@ -2,8 +2,8 @@
// 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.Session;
using Microsoft.SqlTools.EditorServices.Utility;
using Microsoft.SqlTools.ServiceLayer.SqlContext;
namespace Microsoft.SqlTools.ServiceLayer
{
@@ -24,17 +24,19 @@ namespace Microsoft.SqlTools.ServiceLayer
const string hostName = "SQL Tools Service Host";
const string hostProfileId = "SQLToolsService";
Version hostVersion = new Version(1,0);
Version hostVersion = new Version(1,0);
// set up the host details and profile paths
var hostDetails = new HostDetails(hostName, hostProfileId, hostVersion);
var profilePaths = new ProfilePaths(hostProfileId, "baseAllUsersPath", "baseCurrentUserPath");
SqlToolsContext sqlToolsContext = new SqlToolsContext(hostDetails, profilePaths);
// Create the service host
ServiceHost.ServiceHost serviceHost = ServiceHost.ServiceHost.Create(hostDetails, profilePaths);
ServiceHost.ServiceHost serviceHost = ServiceHost.ServiceHost.Create();
// Initialize the services that will be hosted here
LanguageService.LanguageService.Instance.InitializeService(serviceHost);
WorkspaceService.WorkspaceService<SqlToolsSettings>.Instance.InitializeService(serviceHost);
LanguageService.LanguageService.Instance.InitializeService(serviceHost, sqlToolsContext);
// Start the service
serviceHost.Start().Wait();