mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-05 01:25:45 -05:00
Servicehost cleanup (#1)
Merge some code clean ups. Find+Replace 'PowerShell' with 'SQL Tools'. Enable logger in ServiceHost project.
This commit is contained in:
@@ -1,19 +1,37 @@
|
||||
using System;
|
||||
using Microsoft.PowerShell.EditorServices.Protocol.Server;
|
||||
using Microsoft.PowerShell.EditorServices.Session;
|
||||
//
|
||||
// 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
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Main application class for SQL Tools API Service Host executable
|
||||
/// </summary>
|
||||
class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// Main entry point into the SQL Tools API Service Host
|
||||
/// </summary>
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var hostDetails = new HostDetails("name", "profileId", new Version(1,0));
|
||||
var profilePaths = new ProfilePaths("hostProfileId", "baseAllUsersPath", "baseCurrentUserPath");
|
||||
var languageServer = new LanguageServer(hostDetails, profilePaths);
|
||||
|
||||
languageServer.Start().Wait();
|
||||
|
||||
Logger.Initialize();
|
||||
Logger.Write(LogLevel.Normal, "Starting SQL Tools Service Host");
|
||||
|
||||
const string hostName = "SQL Tools Service Host";
|
||||
const string hostProfileId = "SQLToolsService";
|
||||
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");
|
||||
|
||||
// create and run the language server
|
||||
var languageServer = new LanguageServer(hostDetails, profilePaths);
|
||||
languageServer.Start().Wait();
|
||||
languageServer.WaitForExit();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user