diff --git a/README.md b/README.md index e38a335b..7029280f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ -# sqltoolsservice -SQL Tools Service host +# Microsoft SQL Tools Service +The SQL Tools Service is an application that provides core functionality for various SQL Server tools. These features include the following: +* Connection management +* Language Service support using VS Code protocol +* Query execution and resultset management +* Schema discovery diff --git a/ServiceHost/Client/DebugAdapterClientBase.cs b/ServiceHost/Client/DebugAdapterClientBase.cs index 5e6a1758..e2949307 100644 --- a/ServiceHost/Client/DebugAdapterClientBase.cs +++ b/ServiceHost/Client/DebugAdapterClientBase.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Client +namespace Microsoft.SqlTools.EditorServices.Protocol.Client { public class DebugAdapterClient : ProtocolEndpoint { diff --git a/ServiceHost/Client/LanguageClientBase.cs b/ServiceHost/Client/LanguageClientBase.cs index 665383d0..22522252 100644 --- a/ServiceHost/Client/LanguageClientBase.cs +++ b/ServiceHost/Client/LanguageClientBase.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Protocol.LanguageServer; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Client +namespace Microsoft.SqlTools.EditorServices.Protocol.Client { /// /// Provides a base implementation for language server clients. diff --git a/ServiceHost/Client/LanguageServiceClient.cs b/ServiceHost/Client/LanguageServiceClient.cs index 67d769ed..7ec5fba0 100644 --- a/ServiceHost/Client/LanguageServiceClient.cs +++ b/ServiceHost/Client/LanguageServiceClient.cs @@ -3,15 +3,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Protocol.LanguageServer; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Client +namespace Microsoft.SqlTools.EditorServices.Protocol.Client { public class LanguageServiceClient : LanguageClientBase { diff --git a/ServiceHost/DebugAdapter/AttachRequest.cs b/ServiceHost/DebugAdapter/AttachRequest.cs index 4b8faa9c..49fdc5b2 100644 --- a/ServiceHost/DebugAdapter/AttachRequest.cs +++ b/ServiceHost/DebugAdapter/AttachRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class AttachRequest { diff --git a/ServiceHost/DebugAdapter/Breakpoint.cs b/ServiceHost/DebugAdapter/Breakpoint.cs index db04972c..14de1790 100644 --- a/ServiceHost/DebugAdapter/Breakpoint.cs +++ b/ServiceHost/DebugAdapter/Breakpoint.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class Breakpoint { diff --git a/ServiceHost/DebugAdapter/ConfigurationDoneRequest.cs b/ServiceHost/DebugAdapter/ConfigurationDoneRequest.cs index ef5e0c8e..2fc2203f 100644 --- a/ServiceHost/DebugAdapter/ConfigurationDoneRequest.cs +++ b/ServiceHost/DebugAdapter/ConfigurationDoneRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class ConfigurationDoneRequest { diff --git a/ServiceHost/DebugAdapter/ContinueRequest.cs b/ServiceHost/DebugAdapter/ContinueRequest.cs index 5ee5b2ec..c78dd0c3 100644 --- a/ServiceHost/DebugAdapter/ContinueRequest.cs +++ b/ServiceHost/DebugAdapter/ContinueRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class ContinueRequest { diff --git a/ServiceHost/DebugAdapter/DisconnectRequest.cs b/ServiceHost/DebugAdapter/DisconnectRequest.cs index 7f7036b0..43a25908 100644 --- a/ServiceHost/DebugAdapter/DisconnectRequest.cs +++ b/ServiceHost/DebugAdapter/DisconnectRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class DisconnectRequest { diff --git a/ServiceHost/DebugAdapter/EvaluateRequest.cs b/ServiceHost/DebugAdapter/EvaluateRequest.cs index b079f59a..627a3c65 100644 --- a/ServiceHost/DebugAdapter/EvaluateRequest.cs +++ b/ServiceHost/DebugAdapter/EvaluateRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class EvaluateRequest { diff --git a/ServiceHost/DebugAdapter/ExitedEvent.cs b/ServiceHost/DebugAdapter/ExitedEvent.cs index 8a218973..5f35dbf5 100644 --- a/ServiceHost/DebugAdapter/ExitedEvent.cs +++ b/ServiceHost/DebugAdapter/ExitedEvent.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class ExitedEvent { diff --git a/ServiceHost/DebugAdapter/InitializeRequest.cs b/ServiceHost/DebugAdapter/InitializeRequest.cs index 16c99544..d85de828 100644 --- a/ServiceHost/DebugAdapter/InitializeRequest.cs +++ b/ServiceHost/DebugAdapter/InitializeRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class InitializeRequest { diff --git a/ServiceHost/DebugAdapter/InitializedEvent.cs b/ServiceHost/DebugAdapter/InitializedEvent.cs index 68ed6680..2025ab07 100644 --- a/ServiceHost/DebugAdapter/InitializedEvent.cs +++ b/ServiceHost/DebugAdapter/InitializedEvent.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class InitializedEvent { diff --git a/ServiceHost/DebugAdapter/LaunchRequest.cs b/ServiceHost/DebugAdapter/LaunchRequest.cs index 5fa1cb10..0f1f3c55 100644 --- a/ServiceHost/DebugAdapter/LaunchRequest.cs +++ b/ServiceHost/DebugAdapter/LaunchRequest.cs @@ -4,9 +4,9 @@ // using System.Collections.Generic; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class LaunchRequest { diff --git a/ServiceHost/DebugAdapter/NextRequest.cs b/ServiceHost/DebugAdapter/NextRequest.cs index 5cb2e6ac..8d41b539 100644 --- a/ServiceHost/DebugAdapter/NextRequest.cs +++ b/ServiceHost/DebugAdapter/NextRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { // /** StepOver request; value of command field is "next". // he request starts the debuggee to run again for one step. diff --git a/ServiceHost/DebugAdapter/OutputEvent.cs b/ServiceHost/DebugAdapter/OutputEvent.cs index a9cfee8c..ffc92491 100644 --- a/ServiceHost/DebugAdapter/OutputEvent.cs +++ b/ServiceHost/DebugAdapter/OutputEvent.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class OutputEvent { diff --git a/ServiceHost/DebugAdapter/PauseRequest.cs b/ServiceHost/DebugAdapter/PauseRequest.cs index 86ceee4f..d99ec234 100644 --- a/ServiceHost/DebugAdapter/PauseRequest.cs +++ b/ServiceHost/DebugAdapter/PauseRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class PauseRequest { diff --git a/ServiceHost/DebugAdapter/Scope.cs b/ServiceHost/DebugAdapter/Scope.cs index 8384e6c3..a5235ece 100644 --- a/ServiceHost/DebugAdapter/Scope.cs +++ b/ServiceHost/DebugAdapter/Scope.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class Scope { diff --git a/ServiceHost/DebugAdapter/ScopesRequest.cs b/ServiceHost/DebugAdapter/ScopesRequest.cs index 044f5bf7..691f2eb5 100644 --- a/ServiceHost/DebugAdapter/ScopesRequest.cs +++ b/ServiceHost/DebugAdapter/ScopesRequest.cs @@ -4,9 +4,9 @@ // using System.Diagnostics; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class ScopesRequest { diff --git a/ServiceHost/DebugAdapter/SetBreakpointsRequest.cs b/ServiceHost/DebugAdapter/SetBreakpointsRequest.cs index a4993291..f8f3d416 100644 --- a/ServiceHost/DebugAdapter/SetBreakpointsRequest.cs +++ b/ServiceHost/DebugAdapter/SetBreakpointsRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { /// /// SetBreakpoints request; value of command field is "setBreakpoints". diff --git a/ServiceHost/DebugAdapter/SetExceptionBreakpointsRequest.cs b/ServiceHost/DebugAdapter/SetExceptionBreakpointsRequest.cs index a586f27b..1ced918a 100644 --- a/ServiceHost/DebugAdapter/SetExceptionBreakpointsRequest.cs +++ b/ServiceHost/DebugAdapter/SetExceptionBreakpointsRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { /// /// SetExceptionBreakpoints request; value of command field is "setExceptionBreakpoints". diff --git a/ServiceHost/DebugAdapter/SetFunctionBreakpointsRequest.cs b/ServiceHost/DebugAdapter/SetFunctionBreakpointsRequest.cs index 434c6dd5..e274fcd1 100644 --- a/ServiceHost/DebugAdapter/SetFunctionBreakpointsRequest.cs +++ b/ServiceHost/DebugAdapter/SetFunctionBreakpointsRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class SetFunctionBreakpointsRequest { diff --git a/ServiceHost/DebugAdapter/Source.cs b/ServiceHost/DebugAdapter/Source.cs index 5a71ea1e..e36b659d 100644 --- a/ServiceHost/DebugAdapter/Source.cs +++ b/ServiceHost/DebugAdapter/Source.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class Source { diff --git a/ServiceHost/DebugAdapter/SourceRequest.cs b/ServiceHost/DebugAdapter/SourceRequest.cs index 9d185af2..f627aefc 100644 --- a/ServiceHost/DebugAdapter/SourceRequest.cs +++ b/ServiceHost/DebugAdapter/SourceRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class SourceRequest { diff --git a/ServiceHost/DebugAdapter/StackFrame.cs b/ServiceHost/DebugAdapter/StackFrame.cs index cfa2f6a9..90e6c243 100644 --- a/ServiceHost/DebugAdapter/StackFrame.cs +++ b/ServiceHost/DebugAdapter/StackFrame.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class StackFrame { diff --git a/ServiceHost/DebugAdapter/StackTraceRequest.cs b/ServiceHost/DebugAdapter/StackTraceRequest.cs index 06929ba4..cd0301c7 100644 --- a/ServiceHost/DebugAdapter/StackTraceRequest.cs +++ b/ServiceHost/DebugAdapter/StackTraceRequest.cs @@ -4,9 +4,9 @@ // using System.Diagnostics; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class StackTraceRequest { diff --git a/ServiceHost/DebugAdapter/StartedEvent.cs b/ServiceHost/DebugAdapter/StartedEvent.cs index f08f504b..9ecfd6a0 100644 --- a/ServiceHost/DebugAdapter/StartedEvent.cs +++ b/ServiceHost/DebugAdapter/StartedEvent.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class StartedEvent { diff --git a/ServiceHost/DebugAdapter/StepInRequest.cs b/ServiceHost/DebugAdapter/StepInRequest.cs index cfd8f764..42d935fb 100644 --- a/ServiceHost/DebugAdapter/StepInRequest.cs +++ b/ServiceHost/DebugAdapter/StepInRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class StepInRequest { diff --git a/ServiceHost/DebugAdapter/StepOutRequest.cs b/ServiceHost/DebugAdapter/StepOutRequest.cs index 5b86f3f7..17e090a2 100644 --- a/ServiceHost/DebugAdapter/StepOutRequest.cs +++ b/ServiceHost/DebugAdapter/StepOutRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class StepOutRequest { diff --git a/ServiceHost/DebugAdapter/StoppedEvent.cs b/ServiceHost/DebugAdapter/StoppedEvent.cs index b0850ddb..698bd698 100644 --- a/ServiceHost/DebugAdapter/StoppedEvent.cs +++ b/ServiceHost/DebugAdapter/StoppedEvent.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class StoppedEvent { diff --git a/ServiceHost/DebugAdapter/TerminatedEvent.cs b/ServiceHost/DebugAdapter/TerminatedEvent.cs index 2756899f..5671a88e 100644 --- a/ServiceHost/DebugAdapter/TerminatedEvent.cs +++ b/ServiceHost/DebugAdapter/TerminatedEvent.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class TerminatedEvent { diff --git a/ServiceHost/DebugAdapter/Thread.cs b/ServiceHost/DebugAdapter/Thread.cs index 35a8a139..6bc26693 100644 --- a/ServiceHost/DebugAdapter/Thread.cs +++ b/ServiceHost/DebugAdapter/Thread.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class Thread { diff --git a/ServiceHost/DebugAdapter/ThreadsRequest.cs b/ServiceHost/DebugAdapter/ThreadsRequest.cs index e72fcc96..c720cb5b 100644 --- a/ServiceHost/DebugAdapter/ThreadsRequest.cs +++ b/ServiceHost/DebugAdapter/ThreadsRequest.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class ThreadsRequest { diff --git a/ServiceHost/DebugAdapter/Variable.cs b/ServiceHost/DebugAdapter/Variable.cs index 7cd03176..e805dde9 100644 --- a/ServiceHost/DebugAdapter/Variable.cs +++ b/ServiceHost/DebugAdapter/Variable.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class Variable { diff --git a/ServiceHost/DebugAdapter/VariablesRequest.cs b/ServiceHost/DebugAdapter/VariablesRequest.cs index 40dbaabb..cd260b1b 100644 --- a/ServiceHost/DebugAdapter/VariablesRequest.cs +++ b/ServiceHost/DebugAdapter/VariablesRequest.cs @@ -4,9 +4,9 @@ // using System.Diagnostics; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter +namespace Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter { public class VariablesRequest { diff --git a/ServiceHost/LanguageServer/ClientCapabilities.cs b/ServiceHost/LanguageServer/ClientCapabilities.cs index 2bebdeb6..6537e7b5 100644 --- a/ServiceHost/LanguageServer/ClientCapabilities.cs +++ b/ServiceHost/LanguageServer/ClientCapabilities.cs @@ -9,7 +9,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { /// /// Defines a class that describes the capabilities of a language diff --git a/ServiceHost/LanguageServer/Completion.cs b/ServiceHost/LanguageServer/Completion.cs index cf0f1559..3af67735 100644 --- a/ServiceHost/LanguageServer/Completion.cs +++ b/ServiceHost/LanguageServer/Completion.cs @@ -4,9 +4,9 @@ // using System.Diagnostics; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class CompletionRequest { diff --git a/ServiceHost/LanguageServer/Configuration.cs b/ServiceHost/LanguageServer/Configuration.cs index d4f57781..b9ad87db 100644 --- a/ServiceHost/LanguageServer/Configuration.cs +++ b/ServiceHost/LanguageServer/Configuration.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class DidChangeConfigurationNotification { diff --git a/ServiceHost/LanguageServer/Definition.cs b/ServiceHost/LanguageServer/Definition.cs index 37241dd6..b18845c3 100644 --- a/ServiceHost/LanguageServer/Definition.cs +++ b/ServiceHost/LanguageServer/Definition.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class DefinitionRequest { diff --git a/ServiceHost/LanguageServer/Diagnostics.cs b/ServiceHost/LanguageServer/Diagnostics.cs index 116b77c3..87c2f98f 100644 --- a/ServiceHost/LanguageServer/Diagnostics.cs +++ b/ServiceHost/LanguageServer/Diagnostics.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class PublishDiagnosticsNotification { diff --git a/ServiceHost/LanguageServer/DocumentHighlight.cs b/ServiceHost/LanguageServer/DocumentHighlight.cs index c169acc4..6849ddfb 100644 --- a/ServiceHost/LanguageServer/DocumentHighlight.cs +++ b/ServiceHost/LanguageServer/DocumentHighlight.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public enum DocumentHighlightKind { diff --git a/ServiceHost/LanguageServer/EditorCommands.cs b/ServiceHost/LanguageServer/EditorCommands.cs index cdd12813..426d7885 100644 --- a/ServiceHost/LanguageServer/EditorCommands.cs +++ b/ServiceHost/LanguageServer/EditorCommands.cs @@ -3,15 +3,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class ExtensionCommandAddedNotification { public static readonly EventType Type = - EventType.Create("powerShell/extensionCommandAdded"); + EventType.Create("SqlTools/extensionCommandAdded"); public string Name { get; set; } @@ -22,7 +22,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer { public static readonly EventType Type = - EventType.Create("powerShell/extensionCommandUpdated"); + EventType.Create("SqlTools/extensionCommandUpdated"); public string Name { get; set; } } @@ -31,7 +31,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer { public static readonly EventType Type = - EventType.Create("powerShell/extensionCommandRemoved"); + EventType.Create("SqlTools/extensionCommandRemoved"); public string Name { get; set; } } @@ -50,7 +50,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer { public static readonly RequestType Type = - RequestType.Create("powerShell/invokeExtensionCommand"); + RequestType.Create("SqlTools/invokeExtensionCommand"); public string Name { get; set; } diff --git a/ServiceHost/LanguageServer/ExpandAliasRequest.cs b/ServiceHost/LanguageServer/ExpandAliasRequest.cs index cd79c92f..d7f9fde4 100644 --- a/ServiceHost/LanguageServer/ExpandAliasRequest.cs +++ b/ServiceHost/LanguageServer/ExpandAliasRequest.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class ExpandAliasRequest { public static readonly RequestType Type = - RequestType.Create("powerShell/expandAlias"); + RequestType.Create("SqlTools/expandAlias"); } } diff --git a/ServiceHost/LanguageServer/FindModuleRequest.cs b/ServiceHost/LanguageServer/FindModuleRequest.cs index 12ac6cf9..ab78a158 100644 --- a/ServiceHost/LanguageServer/FindModuleRequest.cs +++ b/ServiceHost/LanguageServer/FindModuleRequest.cs @@ -3,16 +3,16 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; using System.Collections.Generic; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class FindModuleRequest { public static readonly RequestType, object> Type = - RequestType, object>.Create("powerShell/findModule"); + RequestType, object>.Create("SqlTools/findModule"); } diff --git a/ServiceHost/LanguageServer/Hover.cs b/ServiceHost/LanguageServer/Hover.cs index 2af60e51..7a8b6cbf 100644 --- a/ServiceHost/LanguageServer/Hover.cs +++ b/ServiceHost/LanguageServer/Hover.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class MarkedString { diff --git a/ServiceHost/LanguageServer/Initialize.cs b/ServiceHost/LanguageServer/Initialize.cs index 40a9d1a2..7551835e 100644 --- a/ServiceHost/LanguageServer/Initialize.cs +++ b/ServiceHost/LanguageServer/Initialize.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class InitializeRequest { diff --git a/ServiceHost/LanguageServer/InstallModuleRequest.cs b/ServiceHost/LanguageServer/InstallModuleRequest.cs index 2be47ce9..b03b8864 100644 --- a/ServiceHost/LanguageServer/InstallModuleRequest.cs +++ b/ServiceHost/LanguageServer/InstallModuleRequest.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { class InstallModuleRequest { public static readonly RequestType Type = - RequestType.Create("powerShell/installModule"); + RequestType.Create("SqlTools/installModule"); } } diff --git a/ServiceHost/LanguageServer/References.cs b/ServiceHost/LanguageServer/References.cs index a55ebebf..25a92b12 100644 --- a/ServiceHost/LanguageServer/References.cs +++ b/ServiceHost/LanguageServer/References.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class ReferencesRequest { diff --git a/ServiceHost/LanguageServer/ServerCapabilities.cs b/ServiceHost/LanguageServer/ServerCapabilities.cs index 34ba312f..2f7404d9 100644 --- a/ServiceHost/LanguageServer/ServerCapabilities.cs +++ b/ServiceHost/LanguageServer/ServerCapabilities.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class ServerCapabilities { diff --git a/ServiceHost/LanguageServer/ShowOnlineHelpRequest.cs b/ServiceHost/LanguageServer/ShowOnlineHelpRequest.cs index 49c571fa..8f21fb1b 100644 --- a/ServiceHost/LanguageServer/ShowOnlineHelpRequest.cs +++ b/ServiceHost/LanguageServer/ShowOnlineHelpRequest.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class ShowOnlineHelpRequest { public static readonly RequestType Type = - RequestType.Create("powerShell/showOnlineHelp"); + RequestType.Create("SqlTools/showOnlineHelp"); } } diff --git a/ServiceHost/LanguageServer/Shutdown.cs b/ServiceHost/LanguageServer/Shutdown.cs index 51971901..f0a7bbd2 100644 --- a/ServiceHost/LanguageServer/Shutdown.cs +++ b/ServiceHost/LanguageServer/Shutdown.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { /// /// Defines a message that is sent from the client to request diff --git a/ServiceHost/LanguageServer/SignatureHelp.cs b/ServiceHost/LanguageServer/SignatureHelp.cs index 6387461d..5d4233e3 100644 --- a/ServiceHost/LanguageServer/SignatureHelp.cs +++ b/ServiceHost/LanguageServer/SignatureHelp.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public class SignatureHelpRequest { diff --git a/ServiceHost/LanguageServer/TextDocument.cs b/ServiceHost/LanguageServer/TextDocument.cs index fd2ee358..9b477c96 100644 --- a/ServiceHost/LanguageServer/TextDocument.cs +++ b/ServiceHost/LanguageServer/TextDocument.cs @@ -4,9 +4,9 @@ // using System.Diagnostics; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { /// /// Defines a base parameter class for identifying a text document. diff --git a/ServiceHost/LanguageServer/WorkspaceSymbols.cs b/ServiceHost/LanguageServer/WorkspaceSymbols.cs index 405d6e98..25a554b5 100644 --- a/ServiceHost/LanguageServer/WorkspaceSymbols.cs +++ b/ServiceHost/LanguageServer/WorkspaceSymbols.cs @@ -3,9 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.SqlTools.EditorServices.Protocol.LanguageServer { public enum SymbolKind { diff --git a/ServiceHost/MessageProtocol/Channel/ChannelBase.cs b/ServiceHost/MessageProtocol/Channel/ChannelBase.cs index 54de0d9c..848da39f 100644 --- a/ServiceHost/MessageProtocol/Channel/ChannelBase.cs +++ b/ServiceHost/MessageProtocol/Channel/ChannelBase.cs @@ -3,10 +3,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Serializers; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel { /// /// Defines a base implementation for servers and their clients over a diff --git a/ServiceHost/MessageProtocol/Channel/NamedPipeClientChannel.cs b/ServiceHost/MessageProtocol/Channel/NamedPipeClientChannel.cs index 27f00f67..5af3711d 100644 --- a/ServiceHost/MessageProtocol/Channel/NamedPipeClientChannel.cs +++ b/ServiceHost/MessageProtocol/Channel/NamedPipeClientChannel.cs @@ -9,7 +9,7 @@ using System; using System.IO.Pipes; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel { public class NamedPipeClientChannel : ChannelBase { diff --git a/ServiceHost/MessageProtocol/Channel/NamedPipeServerChannel.cs b/ServiceHost/MessageProtocol/Channel/NamedPipeServerChannel.cs index d4cf730c..1a3a954a 100644 --- a/ServiceHost/MessageProtocol/Channel/NamedPipeServerChannel.cs +++ b/ServiceHost/MessageProtocol/Channel/NamedPipeServerChannel.cs @@ -8,7 +8,7 @@ using System; using System.IO.Pipes; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel { public class NamedPipeServerChannel : ChannelBase { diff --git a/ServiceHost/MessageProtocol/Channel/StdioClientChannel.cs b/ServiceHost/MessageProtocol/Channel/StdioClientChannel.cs index a6be8cc8..3cf87be4 100644 --- a/ServiceHost/MessageProtocol/Channel/StdioClientChannel.cs +++ b/ServiceHost/MessageProtocol/Channel/StdioClientChannel.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Serializers; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers; using System.Diagnostics; using System.IO; using System.Text; using System; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel { /// /// Provides a client implementation for the standard I/O channel. diff --git a/ServiceHost/MessageProtocol/Channel/StdioServerChannel.cs b/ServiceHost/MessageProtocol/Channel/StdioServerChannel.cs index bfec284e..deb692e1 100644 --- a/ServiceHost/MessageProtocol/Channel/StdioServerChannel.cs +++ b/ServiceHost/MessageProtocol/Channel/StdioServerChannel.cs @@ -3,13 +3,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Serializers; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers; using System.IO; using System.Text; using System; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel { /// /// Provides a server implementation for the standard I/O channel. diff --git a/ServiceHost/MessageProtocol/Constants.cs b/ServiceHost/MessageProtocol/Constants.cs index d443dc12..0fae5d8d 100644 --- a/ServiceHost/MessageProtocol/Constants.cs +++ b/ServiceHost/MessageProtocol/Constants.cs @@ -4,15 +4,9 @@ // using Newtonsoft.Json; -using Newtonsoft.Json.Converters; using Newtonsoft.Json.Serialization; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { public static class Constants { diff --git a/ServiceHost/MessageProtocol/EventContext.cs b/ServiceHost/MessageProtocol/EventContext.cs index e4f4051d..eb42ebbb 100644 --- a/ServiceHost/MessageProtocol/EventContext.cs +++ b/ServiceHost/MessageProtocol/EventContext.cs @@ -3,10 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Newtonsoft.Json.Linq; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Provides context for a received event so that handlers diff --git a/ServiceHost/MessageProtocol/EventType.cs b/ServiceHost/MessageProtocol/EventType.cs index 1b2fe189..dd460817 100644 --- a/ServiceHost/MessageProtocol/EventType.cs +++ b/ServiceHost/MessageProtocol/EventType.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Defines an event type with a particular method name. diff --git a/ServiceHost/MessageProtocol/IMessageSender.cs b/ServiceHost/MessageProtocol/IMessageSender.cs index 80474357..7f331eed 100644 --- a/ServiceHost/MessageProtocol/IMessageSender.cs +++ b/ServiceHost/MessageProtocol/IMessageSender.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { internal interface IMessageSender { diff --git a/ServiceHost/MessageProtocol/IMessageSerializer.cs b/ServiceHost/MessageProtocol/IMessageSerializer.cs index eafd8f20..81b23fa6 100644 --- a/ServiceHost/MessageProtocol/IMessageSerializer.cs +++ b/ServiceHost/MessageProtocol/IMessageSerializer.cs @@ -5,7 +5,7 @@ using Newtonsoft.Json.Linq; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Defines a common interface for message serializers. diff --git a/ServiceHost/MessageProtocol/Message.cs b/ServiceHost/MessageProtocol/Message.cs index 0d304cc0..75dab5cd 100644 --- a/ServiceHost/MessageProtocol/Message.cs +++ b/ServiceHost/MessageProtocol/Message.cs @@ -6,7 +6,7 @@ using System.Diagnostics; using Newtonsoft.Json.Linq; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Defines all possible message types. diff --git a/ServiceHost/MessageProtocol/MessageDispatcher.cs b/ServiceHost/MessageProtocol/MessageDispatcher.cs index d7b62fcd..7d2d9c4c 100644 --- a/ServiceHost/MessageProtocol/MessageDispatcher.cs +++ b/ServiceHost/MessageProtocol/MessageDispatcher.cs @@ -3,15 +3,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Utility; using System; using System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { public class MessageDispatcher { diff --git a/ServiceHost/MessageProtocol/MessageParseException.cs b/ServiceHost/MessageProtocol/MessageParseException.cs index 2155bb14..98a17c20 100644 --- a/ServiceHost/MessageProtocol/MessageParseException.cs +++ b/ServiceHost/MessageProtocol/MessageParseException.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { public class MessageParseException : Exception { diff --git a/ServiceHost/MessageProtocol/MessageProtocolType.cs b/ServiceHost/MessageProtocol/MessageProtocolType.cs index 7aa3d6c8..5484ae3c 100644 --- a/ServiceHost/MessageProtocol/MessageProtocolType.cs +++ b/ServiceHost/MessageProtocol/MessageProtocolType.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Defines the possible message protocol types. diff --git a/ServiceHost/MessageProtocol/MessageReader.cs b/ServiceHost/MessageProtocol/MessageReader.cs index 32ec9387..a2df43ba 100644 --- a/ServiceHost/MessageProtocol/MessageReader.cs +++ b/ServiceHost/MessageProtocol/MessageReader.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; @@ -12,7 +12,7 @@ using System.IO; using System.Text; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { public class MessageReader { diff --git a/ServiceHost/MessageProtocol/MessageWriter.cs b/ServiceHost/MessageProtocol/MessageWriter.cs index 28fbe1eb..96e13bcd 100644 --- a/ServiceHost/MessageProtocol/MessageWriter.cs +++ b/ServiceHost/MessageProtocol/MessageWriter.cs @@ -3,15 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.IO; using System.Text; using System.Threading.Tasks; -using System; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { public class MessageWriter { diff --git a/ServiceHost/MessageProtocol/ProtocolEndpoint.cs b/ServiceHost/MessageProtocol/ProtocolEndpoint.cs index ae033191..daead186 100644 --- a/ServiceHost/MessageProtocol/ProtocolEndpoint.cs +++ b/ServiceHost/MessageProtocol/ProtocolEndpoint.cs @@ -3,13 +3,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { /// /// Provides behavior for a client or server endpoint that diff --git a/ServiceHost/MessageProtocol/RequestContext.cs b/ServiceHost/MessageProtocol/RequestContext.cs index a578f466..a35bb136 100644 --- a/ServiceHost/MessageProtocol/RequestContext.cs +++ b/ServiceHost/MessageProtocol/RequestContext.cs @@ -6,7 +6,7 @@ using Newtonsoft.Json.Linq; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { public class RequestContext { diff --git a/ServiceHost/MessageProtocol/RequestType.cs b/ServiceHost/MessageProtocol/RequestType.cs index e5d0cea0..29fc11c5 100644 --- a/ServiceHost/MessageProtocol/RequestType.cs +++ b/ServiceHost/MessageProtocol/RequestType.cs @@ -5,7 +5,7 @@ using System.Diagnostics; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol { [DebuggerDisplay("RequestType MethodName = {MethodName}")] public class RequestType diff --git a/ServiceHost/MessageProtocol/Serializers/JsonRpcMessageSerializer.cs b/ServiceHost/MessageProtocol/Serializers/JsonRpcMessageSerializer.cs index 8f736ab0..edf14712 100644 --- a/ServiceHost/MessageProtocol/Serializers/JsonRpcMessageSerializer.cs +++ b/ServiceHost/MessageProtocol/Serializers/JsonRpcMessageSerializer.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Serializers +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers { /// /// Serializes messages in the JSON RPC format. Used primarily diff --git a/ServiceHost/MessageProtocol/Serializers/V8MessageSerializer.cs b/ServiceHost/MessageProtocol/Serializers/V8MessageSerializer.cs index 3a1e41e6..4088a223 100644 --- a/ServiceHost/MessageProtocol/Serializers/V8MessageSerializer.cs +++ b/ServiceHost/MessageProtocol/Serializers/V8MessageSerializer.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; -namespace Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Serializers +namespace Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Serializers { /// /// Serializes messages in the V8 format. Used primarily for debug adapters. diff --git a/ServiceHost/Messages/PromptEvents.cs b/ServiceHost/Messages/PromptEvents.cs index 29dcb53c..3be10f75 100644 --- a/ServiceHost/Messages/PromptEvents.cs +++ b/ServiceHost/Messages/PromptEvents.cs @@ -4,15 +4,15 @@ // #if false -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; -namespace Microsoft.PowerShell.EditorServices.Protocol.Messages +namespace Microsoft.SqlTools.EditorServices.Protocol.Messages { public class ShowChoicePromptRequest { public static readonly RequestType Type = - RequestType.Create("powerShell/showChoicePrompt"); + RequestType.Create("SqlTools/showChoicePrompt"); public string Caption { get; set; } @@ -34,7 +34,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Messages { public static readonly RequestType Type = - RequestType.Create("powerShell/showInputPrompt"); + RequestType.Create("SqlTools/showInputPrompt"); /// /// Gets or sets the name of the field. diff --git a/ServiceHost/Program.cs b/ServiceHost/Program.cs index 32298019..622a026c 100644 --- a/ServiceHost/Program.cs +++ b/ServiceHost/Program.cs @@ -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 -{ +{ + /// + /// Main application class for SQL Tools API Service Host executable + /// class Program { + /// + /// Main entry point into the SQL Tools API Service Host + /// 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(); } } diff --git a/ServiceHost/Properties/AssemblyInfo.cs b/ServiceHost/Properties/AssemblyInfo.cs index 3234ac73..8f6b28ad 100644 --- a/ServiceHost/Properties/AssemblyInfo.cs +++ b/ServiceHost/Properties/AssemblyInfo.cs @@ -10,11 +10,11 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("PowerShell Editor Services Host Protocol Library")] -[assembly: AssemblyDescription("Provides message types and client/server APIs for the PowerShell Editor Services JSON protocol.")] +[assembly: AssemblyTitle("SqlTools Editor Services Host Protocol Library")] +[assembly: AssemblyDescription("Provides message types and client/server APIs for the SqlTools Editor Services JSON protocol.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("PowerShell Editor Services")] +[assembly: AssemblyProduct("SqlTools Editor Services")] [assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -41,4 +41,4 @@ using System.Runtime.InteropServices; [assembly: AssemblyFileVersion("0.0.0.0")] [assembly: AssemblyInformationalVersion("0.0.0.0")] -[assembly: InternalsVisibleTo("Microsoft.PowerShell.EditorServices.Test.Protocol")] \ No newline at end of file +[assembly: InternalsVisibleTo("Microsoft.SqlTools.EditorServices.Test.Protocol")] diff --git a/ServiceHost/Server/DebugAdapter.cs b/ServiceHost/Server/DebugAdapter.cs index 1b63dd13..d62b10e9 100644 --- a/ServiceHost/Server/DebugAdapter.cs +++ b/ServiceHost/Server/DebugAdapter.cs @@ -5,11 +5,11 @@ #if false -using Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; -using Microsoft.PowerShell.EditorServices.Session; -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Session; +using Microsoft.SqlTools.EditorServices.Utility; using System; using System.Collections.Generic; using System.IO; @@ -17,7 +17,7 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { public class DebugAdapter : DebugAdapterBase { @@ -40,7 +40,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server this.editorSession = new EditorSession(); this.editorSession.StartSession(hostDetails, profilePaths); this.editorSession.DebugService.DebuggerStopped += this.DebugService_DebuggerStopped; - this.editorSession.ConsoleService.OutputWritten += this.powerShellContext_OutputWritten; + this.editorSession.ConsoleService.OutputWritten += this.SqlToolsContext_OutputWritten; // Set up the output debouncer to throttle output event writes this.outputDebouncer = new OutputDebouncer(this); @@ -75,7 +75,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server protected Task LaunchScript(RequestContext requestContext) { - return editorSession.PowerShellContext + return editorSession.SqlToolsContext .ExecuteScriptAtPath(this.scriptPathToLaunch, this.arguments) .ContinueWith( async (t) => { @@ -130,11 +130,11 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server LaunchRequestArguments launchParams, RequestContext requestContext) { - // Set the working directory for the PowerShell runspace to the cwd passed in via launch.json. + // Set the working directory for the SqlTools runspace to the cwd passed in via launch.json. // In case that is null, use the the folder of the script to be executed. If the resulting // working dir path is a file path then extract the directory and use that. string workingDir = launchParams.Cwd ?? launchParams.Program; - workingDir = PowerShellContext.UnescapePath(workingDir); + workingDir = SqlToolsContext.UnescapePath(workingDir); try { if ((File.GetAttributes(workingDir) & FileAttributes.Directory) != FileAttributes.Directory) @@ -153,7 +153,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server #endif } - editorSession.PowerShellContext.SetWorkingDirectory(workingDir); + editorSession.SqlToolsContext.SetWorkingDirectory(workingDir); Logger.Write(LogLevel.Verbose, "Working dir set to: " + workingDir); // Prepare arguments to the script - if specified @@ -203,18 +203,18 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server handler = async (o, e) => { - if (e.NewSessionState == PowerShellContextState.Ready) + if (e.NewSessionState == SqlToolsContextState.Ready) { await requestContext.SendResult(null); - editorSession.PowerShellContext.SessionStateChanged -= handler; + editorSession.SqlToolsContext.SessionStateChanged -= handler; // Stop the server this.Stop(); } }; - editorSession.PowerShellContext.SessionStateChanged += handler; - editorSession.PowerShellContext.AbortExecution(); + editorSession.SqlToolsContext.SessionStateChanged += handler; + editorSession.SqlToolsContext.AbortExecution(); return Task.FromResult(true); } @@ -571,7 +571,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server }); } - async void powerShellContext_OutputWritten(object sender, OutputWrittenEventArgs e) + async void SqlToolsContext_OutputWritten(object sender, OutputWrittenEventArgs e) { // Queue the output for writing await this.outputDebouncer.Invoke(e); diff --git a/ServiceHost/Server/DebugAdapterBase.cs b/ServiceHost/Server/DebugAdapterBase.cs index f896c119..b0f85aab 100644 --- a/ServiceHost/Server/DebugAdapterBase.cs +++ b/ServiceHost/Server/DebugAdapterBase.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // #if false -using Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { public abstract class DebugAdapterBase : ProtocolEndpoint { diff --git a/ServiceHost/Server/LanguageServer.cs b/ServiceHost/Server/LanguageServer.cs index 1e0dd925..69fddc5e 100644 --- a/ServiceHost/Server/LanguageServer.cs +++ b/ServiceHost/Server/LanguageServer.cs @@ -4,12 +4,12 @@ // -//using Microsoft.PowerShell.EditorServices.Extensions; -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; -using Microsoft.PowerShell.EditorServices.Session; -//using Microsoft.PowerShell.EditorServices.Utility; +//using Microsoft.SqlTools.EditorServices.Extensions; +using Microsoft.SqlTools.EditorServices.Protocol.LanguageServer; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Session; +//using Microsoft.SqlTools.EditorServices.Utility; using System; using System.Collections.Generic; using System.IO; @@ -18,9 +18,9 @@ using System.Linq; //using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using DebugAdapterMessages = Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter; +using DebugAdapterMessages = Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { public class LanguageServer : LanguageServerBase { @@ -49,7 +49,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server #if false this.editorSession = new EditorSession(); this.editorSession.StartSession(hostDetails, profilePaths); - this.editorSession.ConsoleService.OutputWritten += this.powerShellContext_OutputWritten; + this.editorSession.ConsoleService.OutputWritten += this.SqlToolsContext_OutputWritten; // Attach to ExtensionService events this.editorSession.ExtensionService.CommandAdded += ExtensionService_ExtensionAdded; @@ -206,7 +206,7 @@ protected async Task HandleInitializeRequest( psCommand.AddArgument(helpParams); psCommand.AddParameter("Online"); - await editorSession.PowerShellContext.ExecuteCommand(psCommand); + await editorSession.SqlToolsContext.ExecuteCommand(psCommand); await requestContext.SendResult(null); } @@ -219,7 +219,7 @@ protected async Task HandleInitializeRequest( var script = string.Format("Install-Module -Name {0} -Scope CurrentUser", moduleName); var executeTask = - editorSession.PowerShellContext.ExecuteScriptString( + editorSession.SqlToolsContext.ExecuteScriptString( script, true, true).ConfigureAwait(false); @@ -281,11 +281,11 @@ function __Expand-Alias { }"; var psCommand = new PSCommand(); psCommand.AddScript(script); - await this.editorSession.PowerShellContext.ExecuteCommand(psCommand); + await this.editorSession.SqlToolsContext.ExecuteCommand(psCommand); psCommand = new PSCommand(); psCommand.AddCommand("__Expand-Alias").AddArgument(content); - var result = await this.editorSession.PowerShellContext.ExecuteCommand(psCommand); + var result = await this.editorSession.SqlToolsContext.ExecuteCommand(psCommand); await requestContext.SendResult(result.First().ToString()); } @@ -297,7 +297,7 @@ function __Expand-Alias { var psCommand = new PSCommand(); psCommand.AddScript("Find-Module | Select Name, Description"); - var modules = await editorSession.PowerShellContext.ExecuteCommand(psCommand); + var modules = await editorSession.SqlToolsContext.ExecuteCommand(psCommand); var moduleList = new List(); @@ -388,14 +388,14 @@ function __Expand-Alias { this.currentSettings.ScriptAnalysis.SettingsPath; this.currentSettings.Update( - configChangeParams.Settings.Powershell, + configChangeParams.Settings.SqlTools, this.editorSession.Workspace.WorkspacePath); if (!this.profilesLoaded && this.currentSettings.EnableProfileLoading && oldLoadProfiles != this.currentSettings.EnableProfileLoading) { - await this.editorSession.PowerShellContext.LoadHostProfiles(); + await this.editorSession.SqlToolsContext.LoadHostProfiles(); this.profilesLoaded = true; } @@ -570,12 +570,12 @@ function __Expand-Alias { CommandInfo commandInfo = await CommandHelpers.GetCommandInfo( completionItem.Label, - this.editorSession.PowerShellContext); + this.editorSession.SqlToolsContext); completionItem.Documentation = await CommandHelpers.GetCommandSynopsis( commandInfo, - this.editorSession.PowerShellContext); + this.editorSession.SqlToolsContext); } // Send back the updated CompletionItem @@ -696,7 +696,7 @@ function __Expand-Alias { symbolInfo.Add( new MarkedString { - Language = "PowerShell", + Language = "SqlTools", Value = symbolDetails.DisplayString }); @@ -853,7 +853,7 @@ function __Expand-Alias { // is executing. This important in cases where the pipeline thread // gets blocked by something in the script like a prompt to the user. var executeTask = - this.editorSession.PowerShellContext.ExecuteScriptString( + this.editorSession.SqlToolsContext.ExecuteScriptString( evaluateParams.Expression, true, true); @@ -881,7 +881,7 @@ function __Expand-Alias { #region Event Handlers - private async void powerShellContext_OutputWritten(object sender, OutputWrittenEventArgs e) + private async void SqlToolsContext_OutputWritten(object sender, OutputWrittenEventArgs e) { // Queue the output for writing await this.outputDebouncer.Invoke(e); @@ -1149,7 +1149,7 @@ function __Expand-Alias { (completionDetails.CompletionType == CompletionType.ParameterName)) { // Look for type encoded in the tooltip for parameters and variables. - // Display PowerShell type names in [] to be consistent with PowerShell syntax + // Display SqlTools type names in [] to be consistent with SqlTools syntax // and now the debugger displays type names. var matches = Regex.Matches(completionDetails.ToolTipText, @"^(\[.+\])"); if ((matches.Count > 0) && (matches[0].Groups.Count > 1)) @@ -1187,7 +1187,7 @@ function __Expand-Alias { } // We want a special "sort order" for parameters that is not lexicographical. - // Fortunately, PowerShell returns parameters in the preferred sort order by + // Fortunately, SqlTools returns parameters in the preferred sort order by // default (with common params at the end). We just need to make sure the default // order also be the lexicographical order which we do by prefixig the ListItemText // with a leading 0's four digit index. This would not sort correctly for a list diff --git a/ServiceHost/Server/LanguageServerBase.cs b/ServiceHost/Server/LanguageServerBase.cs index f9a9219c..0128484b 100644 --- a/ServiceHost/Server/LanguageServerBase.cs +++ b/ServiceHost/Server/LanguageServerBase.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol.Channel; +using Microsoft.SqlTools.EditorServices.Protocol.LanguageServer; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol.Channel; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { public abstract class LanguageServerBase : ProtocolEndpoint { diff --git a/ServiceHost/Server/LanguageServerEditorOperations.cs b/ServiceHost/Server/LanguageServerEditorOperations.cs index 6ae28caf..e5714b19 100644 --- a/ServiceHost/Server/LanguageServerEditorOperations.cs +++ b/ServiceHost/Server/LanguageServerEditorOperations.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // #if false -using Microsoft.PowerShell.EditorServices.Extensions; -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Extensions; +using Microsoft.SqlTools.EditorServices.Protocol.LanguageServer; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { internal class LanguageServerEditorOperations : IEditorOperations { diff --git a/ServiceHost/Server/LanguageServerSettings.cs b/ServiceHost/Server/LanguageServerSettings.cs index cb90268c..5e9421b6 100644 --- a/ServiceHost/Server/LanguageServerSettings.cs +++ b/ServiceHost/Server/LanguageServerSettings.cs @@ -4,9 +4,9 @@ // using System.IO; -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { public class LanguageServerSettings { @@ -57,7 +57,7 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server if (string.IsNullOrEmpty(workspaceRootPath)) { // The workspace root path could be an empty string - // when the user has opened a PowerShell script file + // when the user has opened a SqlTools script file // without opening an entire folder (workspace) first. // In this case we should just log an error and let // the specified settings path go through even though @@ -79,10 +79,10 @@ namespace Microsoft.PowerShell.EditorServices.Protocol.Server public class LanguageServerSettingsWrapper { - // NOTE: This property is capitalized as 'Powershell' because the - // mode name sent from the client is written as 'powershell' and + // NOTE: This property is capitalized as 'SqlTools' because the + // mode name sent from the client is written as 'SqlTools' and // JSON.net is using camelCasing. - public LanguageServerSettings Powershell { get; set; } + public LanguageServerSettings SqlTools { get; set; } } } diff --git a/ServiceHost/Server/OutputDebouncer.cs b/ServiceHost/Server/OutputDebouncer.cs index e65c83b1..d80673f7 100644 --- a/ServiceHost/Server/OutputDebouncer.cs +++ b/ServiceHost/Server/OutputDebouncer.cs @@ -3,12 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Protocol.DebugAdapter; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Protocol.DebugAdapter; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Utility; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { /// /// Throttles output written via OutputEvents by batching all output diff --git a/ServiceHost/Server/PromptHandlers.cs b/ServiceHost/Server/PromptHandlers.cs index 3d48a3e0..7af7a88c 100644 --- a/ServiceHost/Server/PromptHandlers.cs +++ b/ServiceHost/Server/PromptHandlers.cs @@ -5,13 +5,13 @@ #if false using System; -using Microsoft.PowerShell.EditorServices.Console; -using Microsoft.PowerShell.EditorServices.Protocol.Messages; -using Microsoft.PowerShell.EditorServices.Protocol.MessageProtocol; -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Console; +using Microsoft.SqlTools.EditorServices.Protocol.Messages; +using Microsoft.SqlTools.EditorServices.Protocol.MessageProtocol; +using Microsoft.SqlTools.EditorServices.Utility; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Protocol.Server +namespace Microsoft.SqlTools.EditorServices.Protocol.Server { internal class ProtocolPromptHandlerContext : IPromptHandlerContext { diff --git a/ServiceHost/Session/EditorSession.cs b/ServiceHost/Session/EditorSession.cs index 2d4dea38..21c1b577 100644 --- a/ServiceHost/Session/EditorSession.cs +++ b/ServiceHost/Session/EditorSession.cs @@ -3,13 +3,13 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -// using Microsoft.PowerShell.EditorServices.Console; -// using Microsoft.PowerShell.EditorServices.Extensions; -using Microsoft.PowerShell.EditorServices.Session; -// using Microsoft.PowerShell.EditorServices.Utility; +// using Microsoft.SqlTools.EditorServices.Console; +// using Microsoft.SqlTools.EditorServices.Extensions; +using Microsoft.SqlTools.EditorServices.Session; +// using Microsoft.SqlTools.EditorServices.Utility; // using System.IO; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Manages a single session for all editor services. This @@ -29,9 +29,9 @@ namespace Microsoft.PowerShell.EditorServices public Workspace Workspace { get; private set; } /// - /// Gets the PowerShellContext instance for this session. + /// Gets the SqlToolsContext instance for this session. /// - public PowerShellContext PowerShellContext { get; private set; } + public SqlToolsContext SqlToolsContext { get; private set; } /// /// Gets the LanguageService instance for this session. @@ -75,16 +75,16 @@ namespace Microsoft.PowerShell.EditorServices public void StartSession(HostDetails hostDetails, ProfilePaths profilePaths) { // Initialize all services - this.PowerShellContext = new PowerShellContext(hostDetails, profilePaths); - this.LanguageService = new LanguageService(this.PowerShellContext); - this.DebugService = new DebugService(this.PowerShellContext); - this.ConsoleService = new ConsoleService(this.PowerShellContext); - this.ExtensionService = new ExtensionService(this.PowerShellContext); + this.SqlToolsContext = new SqlToolsContext(hostDetails, profilePaths); + this.LanguageService = new LanguageService(this.SqlToolsContext); + this.DebugService = new DebugService(this.SqlToolsContext); + this.ConsoleService = new ConsoleService(this.SqlToolsContext); + this.ExtensionService = new ExtensionService(this.SqlToolsContext); this.InstantiateAnalysisService(); // Create a workspace to contain open files - this.Workspace = new Workspace(this.PowerShellContext.PowerShellVersion); + this.Workspace = new Workspace(this.SqlToolsContext.SqlToolsVersion); } /// @@ -99,20 +99,20 @@ namespace Microsoft.PowerShell.EditorServices internal void InstantiateAnalysisService(string settingsPath = null) { - // Only enable the AnalysisService if the machine has PowerShell - // v5 installed. Script Analyzer works on earlier PowerShell + // Only enable the AnalysisService if the machine has SqlTools + // v5 installed. Script Analyzer works on earlier SqlTools // versions but our hard dependency on their binaries complicates // the deployment and assembly loading since we would have to // conditionally load the binaries for v3/v4 support. This problem // will be solved in the future by using Script Analyzer as a // module rather than an assembly dependency. - if (this.PowerShellContext.PowerShellVersion.Major >= 5) + if (this.SqlToolsContext.SqlToolsVersion.Major >= 5) { // AnalysisService will throw FileNotFoundException if // Script Analyzer binaries are not included. try { - this.AnalysisService = new AnalysisService(this.PowerShellContext.ConsoleHost, settingsPath); + this.AnalysisService = new AnalysisService(this.SqlToolsContext.ConsoleHost, settingsPath); } catch (FileNotFoundException) { @@ -125,8 +125,8 @@ namespace Microsoft.PowerShell.EditorServices { Logger.Write( LogLevel.Normal, - "Script Analyzer cannot be loaded due to unsupported PowerShell version " + - this.PowerShellContext.PowerShellVersion.ToString()); + "Script Analyzer cannot be loaded due to unsupported SqlTools version " + + this.SqlToolsContext.SqlToolsVersion.ToString()); } } @@ -146,10 +146,10 @@ namespace Microsoft.PowerShell.EditorServices this.AnalysisService = null; } - if (this.PowerShellContext != null) + if (this.SqlToolsContext != null) { - this.PowerShellContext.Dispose(); - this.PowerShellContext = null; + this.SqlToolsContext.Dispose(); + this.SqlToolsContext = null; } } diff --git a/ServiceHost/Session/HostDetails.cs b/ServiceHost/Session/HostDetails.cs index a20bc8cf..1a5fc80d 100644 --- a/ServiceHost/Session/HostDetails.cs +++ b/ServiceHost/Session/HostDetails.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.SqlTools.EditorServices.Session { /// /// Contains details about the current host application (most @@ -16,19 +16,19 @@ namespace Microsoft.PowerShell.EditorServices.Session #region Constants /// - /// The default host name for PowerShell Editor Services. Used + /// The default host name for SqlTools Editor Services. Used /// if no host name is specified by the host application. /// - public const string DefaultHostName = "PowerShell Editor Services Host"; + public const string DefaultHostName = "SqlTools Editor Services Host"; /// - /// The default host ID for PowerShell Editor Services. Used + /// The default host ID for SqlTools Editor Services. Used /// for the host-specific profile path if no host ID is specified. /// - public const string DefaultHostProfileId = "Microsoft.PowerShellEditorServices"; + public const string DefaultHostProfileId = "Microsoft.SqlToolsEditorServices"; /// - /// The default host version for PowerShell Editor Services. If + /// The default host version for SqlTools Editor Services. If /// no version is specified by the host application, we use 0.0.0 /// to indicate a lack of version. /// @@ -71,7 +71,7 @@ namespace Microsoft.PowerShell.EditorServices.Session /// "[Application Name] Host". /// /// - /// The identifier of the PowerShell host to use for its profile path. + /// The identifier of the SqlTools host to use for its profile path. /// loaded. Used to resolve a profile path of the form 'X_profile.ps1' /// where 'X' represents the value of hostProfileId. If null, a default /// will be used. diff --git a/ServiceHost/Session/OutputType.cs b/ServiceHost/Session/OutputType.cs index ad67f689..8ba866d7 100644 --- a/ServiceHost/Session/OutputType.cs +++ b/ServiceHost/Session/OutputType.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Enumerates the types of output lines that will be sent @@ -34,7 +34,7 @@ namespace Microsoft.PowerShell.EditorServices /// /// An error output line, written with the Write-Error cmdlet or - /// as a result of some error during PowerShell pipeline execution. + /// as a result of some error during SqlTools pipeline execution. /// Error } diff --git a/ServiceHost/Session/OutputWrittenEventArgs.cs b/ServiceHost/Session/OutputWrittenEventArgs.cs index b1408a99..4b1dbbe3 100644 --- a/ServiceHost/Session/OutputWrittenEventArgs.cs +++ b/ServiceHost/Session/OutputWrittenEventArgs.cs @@ -5,11 +5,11 @@ using System; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Provides details about output that has been written to the - /// PowerShell host. + /// SqlTools host. /// public class OutputWrittenEventArgs { diff --git a/ServiceHost/Session/ProfilePaths.cs b/ServiceHost/Session/ProfilePaths.cs index d1ec5557..4af38521 100644 --- a/ServiceHost/Session/ProfilePaths.cs +++ b/ServiceHost/Session/ProfilePaths.cs @@ -8,11 +8,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.SqlTools.EditorServices.Session { /// /// Provides profile path resolution behavior relative to the name - /// of a particular PowerShell host. + /// of a particular SqlTools host. /// public class ProfilePaths { diff --git a/ServiceHost/Utility/AsyncContext.cs b/ServiceHost/Utility/AsyncContext.cs index 421ca3d9..c0baa889 100644 --- a/ServiceHost/Utility/AsyncContext.cs +++ b/ServiceHost/Utility/AsyncContext.cs @@ -7,7 +7,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Simplifies the setup of a SynchronizationContext for the use diff --git a/ServiceHost/Utility/AsyncContextThread.cs b/ServiceHost/Utility/AsyncContextThread.cs index 92629437..7b7947a5 100644 --- a/ServiceHost/Utility/AsyncContextThread.cs +++ b/ServiceHost/Utility/AsyncContextThread.cs @@ -7,7 +7,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Provides a simplified interface for creating a new thread diff --git a/ServiceHost/Utility/AsyncDebouncer.cs b/ServiceHost/Utility/AsyncDebouncer.cs index f8bbd242..86d05a2b 100644 --- a/ServiceHost/Utility/AsyncDebouncer.cs +++ b/ServiceHost/Utility/AsyncDebouncer.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Restricts the invocation of an operation to a specified time diff --git a/ServiceHost/Utility/AsyncLock.cs b/ServiceHost/Utility/AsyncLock.cs index eee894d9..b12983ce 100644 --- a/ServiceHost/Utility/AsyncLock.cs +++ b/ServiceHost/Utility/AsyncLock.cs @@ -7,7 +7,7 @@ using System; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Provides a simple wrapper over a SemaphoreSlim to allow diff --git a/ServiceHost/Utility/AsyncQueue.cs b/ServiceHost/Utility/AsyncQueue.cs index 98c00dc8..c899ee78 100644 --- a/ServiceHost/Utility/AsyncQueue.cs +++ b/ServiceHost/Utility/AsyncQueue.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Provides a synchronized queue which can be used from within async diff --git a/ServiceHost/Utility/Extensions.cs b/ServiceHost/Utility/Extensions.cs index 432b0c83..c73bc03c 100644 --- a/ServiceHost/Utility/Extensions.cs +++ b/ServiceHost/Utility/Extensions.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { internal static class ObjectExtensions { diff --git a/ServiceHost/Utility/Logger.cs b/ServiceHost/Utility/Logger.cs index fbdef40f..6bdd39bd 100644 --- a/ServiceHost/Utility/Logger.cs +++ b/ServiceHost/Utility/Logger.cs @@ -8,7 +8,7 @@ using System.IO; using System.Runtime.CompilerServices; using System.Text; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Defines the level indicators for log messages. @@ -54,7 +54,7 @@ namespace Microsoft.PowerShell.EditorServices.Utility /// Optional. Specifies the minimum log message level to write to the log file. /// public static void Initialize( - string logFilePath = "EditorServices.log", + string logFilePath = "SqlToolsService.log", LogLevel minimumLogLevel = LogLevel.Normal) { if (logWriter != null) @@ -118,32 +118,25 @@ namespace Microsoft.PowerShell.EditorServices.Utility this.minimumLogLevel = minimumLogLevel; // Ensure that we have a usable log file path -// if (!Path.IsPathRooted(logFilePath)) -// { -// logFilePath = -// Path.Combine( -// #if NanoServer -// AppContext.BaseDirectory, -// #else -// AppDomain.CurrentDomain.BaseDirectory, -// #endif -// logFilePath); -// } + if (!Path.IsPathRooted(logFilePath)) + { + logFilePath = + Path.Combine( + AppContext.BaseDirectory, + logFilePath); + } -// if (!this.TryOpenLogFile(logFilePath, deleteExisting)) -// { -// // If the log file couldn't be opened at this location, -// // try opening it in a more reliable path -// this.TryOpenLogFile( -// Path.Combine( -// #if NanoServer -// Environment.GetEnvironmentVariable("TEMP"), -// #else -// Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), -// #endif -// Path.GetFileName(logFilePath)), -// deleteExisting); -// } + + if (!this.TryOpenLogFile(logFilePath, deleteExisting)) + { + // If the log file couldn't be opened at this location, + // try opening it in a more reliable path + this.TryOpenLogFile( + Path.Combine( + Environment.GetEnvironmentVariable("TEMP"), + Path.GetFileName(logFilePath)), + deleteExisting); + } } public void Write( diff --git a/ServiceHost/Utility/ThreadSynchronizationContext.cs b/ServiceHost/Utility/ThreadSynchronizationContext.cs index 03b57bee..2389bbb0 100644 --- a/ServiceHost/Utility/ThreadSynchronizationContext.cs +++ b/ServiceHost/Utility/ThreadSynchronizationContext.cs @@ -7,7 +7,7 @@ using System; using System.Collections.Concurrent; using System.Threading; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Provides a SynchronizationContext implementation that can be used diff --git a/ServiceHost/Utility/Validate.cs b/ServiceHost/Utility/Validate.cs index 19aefe2c..c788e67b 100644 --- a/ServiceHost/Utility/Validate.cs +++ b/ServiceHost/Utility/Validate.cs @@ -6,7 +6,7 @@ using System; using System.Collections.Generic; -namespace Microsoft.PowerShell.EditorServices.Utility +namespace Microsoft.SqlTools.EditorServices.Utility { /// /// Provides common validation methods to simplify method diff --git a/ServiceHost/Workspace/BufferPosition.cs b/ServiceHost/Workspace/BufferPosition.cs index effdd766..0a892f79 100644 --- a/ServiceHost/Workspace/BufferPosition.cs +++ b/ServiceHost/Workspace/BufferPosition.cs @@ -5,7 +5,7 @@ using System.Diagnostics; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Provides details about a position in a file buffer. All diff --git a/ServiceHost/Workspace/BufferRange.cs b/ServiceHost/Workspace/BufferRange.cs index 147eed04..5d20598f 100644 --- a/ServiceHost/Workspace/BufferRange.cs +++ b/ServiceHost/Workspace/BufferRange.cs @@ -6,7 +6,7 @@ using System; using System.Diagnostics; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Provides details about a range between two positions in diff --git a/ServiceHost/Workspace/FileChange.cs b/ServiceHost/Workspace/FileChange.cs index 3bec7982..2f6efdf8 100644 --- a/ServiceHost/Workspace/FileChange.cs +++ b/ServiceHost/Workspace/FileChange.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Contains details relating to a content change in an open file. diff --git a/ServiceHost/Workspace/FilePosition.cs b/ServiceHost/Workspace/FilePosition.cs index d216b1e5..89d915ee 100644 --- a/ServiceHost/Workspace/FilePosition.cs +++ b/ServiceHost/Workspace/FilePosition.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Provides details and operations for a buffer position in a diff --git a/ServiceHost/Workspace/ScriptFile.cs b/ServiceHost/Workspace/ScriptFile.cs index 4623ed2a..c68ecb96 100644 --- a/ServiceHost/Workspace/ScriptFile.cs +++ b/ServiceHost/Workspace/ScriptFile.cs @@ -3,7 +3,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; using System; using System.Collections.Generic; using System.IO; @@ -11,7 +11,7 @@ using System.Linq; //using System.Management.Automation; //using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Contains the details and contents of an open script file. @@ -22,7 +22,7 @@ namespace Microsoft.PowerShell.EditorServices #region Private Fields private Token[] scriptTokens; - private Version powerShellVersion; + private Version SqlToolsVersion; #endregion @@ -134,18 +134,18 @@ namespace Microsoft.PowerShell.EditorServices /// The path at which the script file resides. /// The path which the client uses to identify the file. /// The TextReader to use for reading the file's contents. - /// The version of PowerShell for which the script is being parsed. + /// The version of SqlTools for which the script is being parsed. public ScriptFile( string filePath, string clientFilePath, TextReader textReader, - Version powerShellVersion) + Version SqlToolsVersion) { this.FilePath = filePath; this.ClientFilePath = clientFilePath; this.IsAnalysisEnabled = true; this.IsInMemory = Workspace.IsPathInMemory(filePath); - this.powerShellVersion = powerShellVersion; + this.SqlToolsVersion = SqlToolsVersion; this.SetFileContents(textReader.ReadToEnd()); } @@ -156,17 +156,17 @@ namespace Microsoft.PowerShell.EditorServices /// The path at which the script file resides. /// The path which the client uses to identify the file. /// The initial contents of the script file. - /// The version of PowerShell for which the script is being parsed. + /// The version of SqlTools for which the script is being parsed. public ScriptFile( string filePath, string clientFilePath, string initialBuffer, - Version powerShellVersion) + Version SqlToolsVersion) { this.FilePath = filePath; this.ClientFilePath = clientFilePath; this.IsAnalysisEnabled = true; - this.powerShellVersion = powerShellVersion; + this.SqlToolsVersion = SqlToolsVersion; this.SetFileContents(initialBuffer); } @@ -498,10 +498,10 @@ namespace Microsoft.PowerShell.EditorServices try { -#if PowerShellv5r2 +#if SqlToolsv5r2 // This overload appeared with Windows 10 Update 1 - if (this.powerShellVersion.Major >= 5 && - this.powerShellVersion.Build >= 10586) + if (this.SqlToolsVersion.Major >= 5 && + this.SqlToolsVersion.Build >= 10586) { // Include the file path so that module relative // paths are evaluated correctly diff --git a/ServiceHost/Workspace/ScriptFileMarker.cs b/ServiceHost/Workspace/ScriptFileMarker.cs index 838b17eb..fbe944d6 100644 --- a/ServiceHost/Workspace/ScriptFileMarker.cs +++ b/ServiceHost/Workspace/ScriptFileMarker.cs @@ -3,15 +3,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; using System; //using System.Management.Automation.Language; #if ScriptAnalyzer -using Microsoft.Windows.PowerShell.ScriptAnalyzer.Generic; +using Microsoft.Windows.SqlTools.ScriptAnalyzer.Generic; #endif -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Defines the message level of a script file marker. diff --git a/ServiceHost/Workspace/ScriptRegion.cs b/ServiceHost/Workspace/ScriptRegion.cs index e7662372..f2fa4ac8 100644 --- a/ServiceHost/Workspace/ScriptRegion.cs +++ b/ServiceHost/Workspace/ScriptRegion.cs @@ -5,7 +5,7 @@ //using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Contains details about a specific region of text in script file. diff --git a/ServiceHost/Workspace/Workspace.cs b/ServiceHost/Workspace/Workspace.cs index e51eacf7..b8635ef2 100644 --- a/ServiceHost/Workspace/Workspace.cs +++ b/ServiceHost/Workspace/Workspace.cs @@ -3,14 +3,14 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.SqlTools.EditorServices.Utility; using System; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.SqlTools.EditorServices { /// /// Manages a "workspace" of script files that are open for a particular @@ -21,7 +21,7 @@ namespace Microsoft.PowerShell.EditorServices #if false #region Private Fields - private Version powerShellVersion; + private Version SqlToolsVersion; private Dictionary workspaceFiles = new Dictionary(); #endregion @@ -40,10 +40,10 @@ namespace Microsoft.PowerShell.EditorServices /// /// Creates a new instance of the Workspace class. /// - /// The version of PowerShell for which scripts will be parsed. - public Workspace(Version powerShellVersion) + /// The version of SqlTools for which scripts will be parsed. + public Workspace(Version SqlToolsVersion) { - this.powerShellVersion = powerShellVersion; + this.SqlToolsVersion = SqlToolsVersion; } #endregion @@ -83,7 +83,7 @@ namespace Microsoft.PowerShell.EditorServices resolvedFilePath, filePath, streamReader, - this.powerShellVersion); + this.SqlToolsVersion); this.workspaceFiles.Add(keyName, scriptFile); } @@ -118,7 +118,7 @@ namespace Microsoft.PowerShell.EditorServices resolvedFilePath, filePath, initialBuffer, - this.powerShellVersion); + this.SqlToolsVersion); this.workspaceFiles.Add(keyName, scriptFile); @@ -239,8 +239,8 @@ namespace Microsoft.PowerShell.EditorServices // Clients could specify paths with escaped space, [ and ] characters which .NET APIs // will not handle. These paths will get appropriately escaped just before being passed - // into the PowerShell engine. - filePath = PowerShellContext.UnescapePath(filePath); + // into the SqlTools engine. + filePath = SqlToolsContext.UnescapePath(filePath); // Get the absolute file path filePath = Path.GetFullPath(filePath); @@ -253,10 +253,10 @@ namespace Microsoft.PowerShell.EditorServices internal static bool IsPathInMemory(string filePath) { - // When viewing PowerShell files in the Git diff viewer, VS Code + // When viewing SqlTools files in the Git diff viewer, VS Code // sends the contents of the file at HEAD with a URI that starts // with 'inmemory'. Untitled files which have been marked of - // type PowerShell have a path starting with 'untitled'. + // type SqlTools have a path starting with 'untitled'. return filePath.StartsWith("inmemory") || filePath.StartsWith("untitled");