diff --git a/module/PowerShellEditorServices/PowerShellEditorServices.psm1 b/module/PowerShellEditorServices/PowerShellEditorServices.psm1 index 431e208b9..79a5dbd23 100644 --- a/module/PowerShellEditorServices/PowerShellEditorServices.psm1 +++ b/module/PowerShellEditorServices/PowerShellEditorServices.psm1 @@ -91,13 +91,13 @@ function Start-EditorServicesHost { $editorServicesHost = $null $hostDetails = - Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.HostDetails @( + Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.Hosting.HostDetails @( $HostName, $HostProfileId, (Microsoft.PowerShell.Utility\New-Object System.Version @($HostVersion))) $editorServicesHost = - Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.EditorServicesHost @( + Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServicesHost @( $hostDetails, $BundledModulesPath, $EnableConsoleRepl.IsPresent, @@ -108,7 +108,7 @@ function Start-EditorServicesHost { # Build the profile paths using the root paths of the current $profile variable $profilePaths = - Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.ProfilePaths @( + Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.Hosting.ProfilePaths @( $hostDetails.ProfileId, [System.IO.Path]::GetDirectoryName($profile.AllUsersAllHosts), [System.IO.Path]::GetDirectoryName($profile.CurrentUserAllHosts)) @@ -116,32 +116,32 @@ function Start-EditorServicesHost { $editorServicesHost.StartLogging($LogPath, $LogLevel); $languageServiceConfig = - Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportConfig + Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportConfig $debugServiceConfig = - Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportConfig + Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportConfig switch ($PSCmdlet.ParameterSetName) { "Stdio" { - $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportType]::Stdio - $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportType]::Stdio + $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportType]::Stdio + $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportType]::Stdio break } "NamedPipe" { - $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportType]::NamedPipe + $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportType]::NamedPipe $languageServiceConfig.InOutPipeName = "$LanguageServiceNamedPipe" if ($DebugServiceNamedPipe) { - $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportType]::NamedPipe + $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportType]::NamedPipe $debugServiceConfig.InOutPipeName = "$DebugServiceNamedPipe" } break } "NamedPipeSimplex" { - $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportType]::NamedPipe + $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportType]::NamedPipe $languageServiceConfig.InPipeName = $LanguageServiceInNamedPipe $languageServiceConfig.OutPipeName = $LanguageServiceOutNamedPipe if ($DebugServiceInNamedPipe -and $DebugServiceOutNamedPipe) { - $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.EditorServiceTransportType]::NamedPipe + $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine.Hosting.EditorServiceTransportType]::NamedPipe $debugServiceConfig.InPipeName = $DebugServiceInNamedPipe $debugServiceConfig.OutPipeName = $DebugServiceOutNamedPipe } diff --git a/src/PowerShellEditorServices.Engine/BuildInfo.cs b/src/PowerShellEditorServices.Engine/BuildInfo.cs index f808390e5..47c020fbf 100644 --- a/src/PowerShellEditorServices.Engine/BuildInfo.cs +++ b/src/PowerShellEditorServices.Engine/BuildInfo.cs @@ -1,9 +1,14 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + namespace Microsoft.PowerShell.EditorServices.Engine { public static class BuildInfo { public const string BuildVersion = ""; public const string BuildOrigin = ""; - public static readonly System.DateTime? BuildTime = null; + public static readonly System.DateTime? BuildTime; } } diff --git a/src/PowerShellEditorServices.Engine/Hosting/EditorServicesHost.cs b/src/PowerShellEditorServices.Engine/Hosting/EditorServicesHost.cs index 161d298fc..83f61a729 100644 --- a/src/PowerShellEditorServices.Engine/Hosting/EditorServicesHost.cs +++ b/src/PowerShellEditorServices.Engine/Hosting/EditorServicesHost.cs @@ -15,9 +15,10 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.PowerShell.EditorServices.Engine.Server; +using Microsoft.PowerShell.EditorServices.Utility; using Serilog; -namespace Microsoft.PowerShell.EditorServices.Engine +namespace Microsoft.PowerShell.EditorServices.Engine.Hosting { public enum EditorServicesHostStatus { diff --git a/src/PowerShellEditorServices.Engine/Hosting/HostDetails.cs b/src/PowerShellEditorServices.Engine/Hosting/HostDetails.cs index febaaf7c8..ffd829087 100644 --- a/src/PowerShellEditorServices.Engine/Hosting/HostDetails.cs +++ b/src/PowerShellEditorServices.Engine/Hosting/HostDetails.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices.Engine +namespace Microsoft.PowerShell.EditorServices.Engine.Hosting { /// /// Contains details about the current host application (most diff --git a/src/PowerShellEditorServices.Engine/Hosting/ProfilePaths.cs b/src/PowerShellEditorServices.Engine/Hosting/ProfilePaths.cs index 29bab2b56..4f5e17dce 100644 --- a/src/PowerShellEditorServices.Engine/Hosting/ProfilePaths.cs +++ b/src/PowerShellEditorServices.Engine/Hosting/ProfilePaths.cs @@ -3,13 +3,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Management.Automation.Runspaces; -namespace Microsoft.PowerShell.EditorServices.Engine +namespace Microsoft.PowerShell.EditorServices.Engine.Hosting { /// /// Provides profile path resolution behavior relative to the name diff --git a/src/PowerShellEditorServices.Engine/Hosting/PsesLogLevel.cs b/src/PowerShellEditorServices.Engine/Hosting/PsesLogLevel.cs index dfd50ffaf..4438fdd02 100644 --- a/src/PowerShellEditorServices.Engine/Hosting/PsesLogLevel.cs +++ b/src/PowerShellEditorServices.Engine/Hosting/PsesLogLevel.cs @@ -1,6 +1,11 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Engine +namespace Microsoft.PowerShell.EditorServices.Engine.Hosting { public enum PsesLogLevel { diff --git a/src/PowerShellEditorServices.Engine/LanguageServerSettings.cs b/src/PowerShellEditorServices.Engine/LanguageServerSettings.cs deleted file mode 100644 index 26eb0e9a5..000000000 --- a/src/PowerShellEditorServices.Engine/LanguageServerSettings.cs +++ /dev/null @@ -1,381 +0,0 @@ -// -// 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 System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Security; -using Microsoft.Extensions.Logging; - -namespace Microsoft.PowerShell.EditorServices.Engine -{ - public class LanguageServerSettings - { - public bool EnableProfileLoading { get; set; } - - public ScriptAnalysisSettings ScriptAnalysis { get; set; } - - public CodeFormattingSettings CodeFormatting { get; set; } - - public CodeFoldingSettings CodeFolding { get; set; } - - public LanguageServerSettings() - { - this.ScriptAnalysis = new ScriptAnalysisSettings(); - this.CodeFormatting = new CodeFormattingSettings(); - this.CodeFolding = new CodeFoldingSettings(); - } - - public void Update( - LanguageServerSettings settings, - string workspaceRootPath, - ILogger logger) - { - if (settings != null) - { - this.EnableProfileLoading = settings.EnableProfileLoading; - this.ScriptAnalysis.Update( - settings.ScriptAnalysis, - workspaceRootPath, - logger); - this.CodeFormatting = new CodeFormattingSettings(settings.CodeFormatting); - this.CodeFolding.Update(settings.CodeFolding, logger); - } - } - } - - public class ScriptAnalysisSettings - { - public bool? Enable { get; set; } - - public string SettingsPath { get; set; } - - public ScriptAnalysisSettings() - { - this.Enable = true; - } - - public void Update( - ScriptAnalysisSettings settings, - string workspaceRootPath, - ILogger logger) - { - if (settings != null) - { - this.Enable = settings.Enable; - - string settingsPath = settings.SettingsPath; - - try - { - if (string.IsNullOrWhiteSpace(settingsPath)) - { - settingsPath = null; - } - else if (!Path.IsPathRooted(settingsPath)) - { - if (string.IsNullOrEmpty(workspaceRootPath)) - { - // The workspace root path could be an empty string - // when the user has opened a PowerShell 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 - // it will fail to load. - logger.LogError( - "Could not resolve Script Analyzer settings path due to null or empty workspaceRootPath."); - } - else - { - settingsPath = Path.GetFullPath(Path.Combine(workspaceRootPath, settingsPath)); - } - } - - this.SettingsPath = settingsPath; - logger.LogDebug($"Using Script Analyzer settings path - '{settingsPath ?? ""}'."); - } - catch (Exception ex) when ( - ex is NotSupportedException || - ex is PathTooLongException || - ex is SecurityException) - { - // Invalid chars in path like ${env:HOME} can cause Path.GetFullPath() to throw, catch such errors here - logger.LogException( - $"Invalid Script Analyzer settings path - '{settingsPath}'.", - ex); - - this.SettingsPath = null; - } - } - } - } - - /// - /// Code formatting presets. - /// See https://en.wikipedia.org/wiki/Indent_style for details on indent and brace styles. - /// - public enum CodeFormattingPreset - { - /// - /// Use the formatting settings as-is. - /// - Custom, - - /// - /// Configure the formatting settings to resemble the Allman indent/brace style. - /// - Allman, - - /// - /// Configure the formatting settings to resemble the one true brace style variant of K&R indent/brace style. - /// - OTBS, - - /// - /// Configure the formatting settings to resemble the Stroustrup brace style variant of K&R indent/brace style. - /// - Stroustrup - } - - /// - /// Multi-line pipeline style settings. - /// - public enum PipelineIndentationStyle - { - /// - /// After the indentation level only once after the first pipeline and keep this level for the following pipelines. - /// - IncreaseIndentationForFirstPipeline, - - /// - /// After every pipeline, keep increasing the indentation. - /// - IncreaseIndentationAfterEveryPipeline, - - /// - /// Do not increase indentation level at all after pipeline. - /// - NoIndentation - } - - public class CodeFormattingSettings - { - /// - /// Default constructor. - /// > - public CodeFormattingSettings() - { - - } - - /// - /// Copy constructor. - /// - /// An instance of type CodeFormattingSettings. - public CodeFormattingSettings(CodeFormattingSettings codeFormattingSettings) - { - if (codeFormattingSettings == null) - { - throw new ArgumentNullException(nameof(codeFormattingSettings)); - } - - foreach (var prop in this.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) - { - prop.SetValue(this, prop.GetValue(codeFormattingSettings)); - } - } - - public CodeFormattingPreset Preset { get; set; } - public bool OpenBraceOnSameLine { get; set; } - public bool NewLineAfterOpenBrace { get; set; } - public bool NewLineAfterCloseBrace { get; set; } - public PipelineIndentationStyle PipelineIndentationStyle { get; set; } - public bool WhitespaceBeforeOpenBrace { get; set; } - public bool WhitespaceBeforeOpenParen { get; set; } - public bool WhitespaceAroundOperator { get; set; } - public bool WhitespaceAfterSeparator { get; set; } - public bool WhitespaceInsideBrace { get; set; } - public bool WhitespaceAroundPipe { get; set; } - public bool IgnoreOneLineBlock { get; set; } - public bool AlignPropertyValuePairs { get; set; } - public bool UseCorrectCasing { get; set; } - - - /// - /// Get the settings hashtable that will be consumed by PSScriptAnalyzer. - /// - /// The tab size in the number spaces. - /// If true, insert spaces otherwise insert tabs for indentation. - /// - public Hashtable GetPSSASettingsHashtable( - int tabSize, - bool insertSpaces) - { - var settings = GetCustomPSSASettingsHashtable(tabSize, insertSpaces); - var ruleSettings = (Hashtable)(settings["Rules"]); - var closeBraceSettings = (Hashtable)ruleSettings["PSPlaceCloseBrace"]; - var openBraceSettings = (Hashtable)ruleSettings["PSPlaceOpenBrace"]; - switch(Preset) - { - case CodeFormattingPreset.Allman: - openBraceSettings["OnSameLine"] = false; - openBraceSettings["NewLineAfter"] = true; - closeBraceSettings["NewLineAfter"] = true; - break; - - case CodeFormattingPreset.OTBS: - openBraceSettings["OnSameLine"] = true; - openBraceSettings["NewLineAfter"] = true; - closeBraceSettings["NewLineAfter"] = false; - break; - - case CodeFormattingPreset.Stroustrup: - openBraceSettings["OnSameLine"] = true; - openBraceSettings["NewLineAfter"] = true; - closeBraceSettings["NewLineAfter"] = true; - break; - - default: - break; - } - - return settings; - } - - private Hashtable GetCustomPSSASettingsHashtable(int tabSize, bool insertSpaces) - { - return new Hashtable - { - {"IncludeRules", new string[] { - "PSPlaceCloseBrace", - "PSPlaceOpenBrace", - "PSUseConsistentWhitespace", - "PSUseConsistentIndentation", - "PSAlignAssignmentStatement" - }}, - {"Rules", new Hashtable { - {"PSPlaceOpenBrace", new Hashtable { - {"Enable", true}, - {"OnSameLine", OpenBraceOnSameLine}, - {"NewLineAfter", NewLineAfterOpenBrace}, - {"IgnoreOneLineBlock", IgnoreOneLineBlock} - }}, - {"PSPlaceCloseBrace", new Hashtable { - {"Enable", true}, - {"NewLineAfter", NewLineAfterCloseBrace}, - {"IgnoreOneLineBlock", IgnoreOneLineBlock} - }}, - {"PSUseConsistentIndentation", new Hashtable { - {"Enable", true}, - {"IndentationSize", tabSize}, - {"PipelineIndentation", PipelineIndentationStyle }, - {"Kind", insertSpaces ? "space" : "tab"} - }}, - {"PSUseConsistentWhitespace", new Hashtable { - {"Enable", true}, - {"CheckOpenBrace", WhitespaceBeforeOpenBrace}, - {"CheckOpenParen", WhitespaceBeforeOpenParen}, - {"CheckOperator", WhitespaceAroundOperator}, - {"CheckSeparator", WhitespaceAfterSeparator}, - {"CheckInnerBrace", WhitespaceInsideBrace}, - {"CheckPipe", WhitespaceAroundPipe}, - }}, - {"PSAlignAssignmentStatement", new Hashtable { - {"Enable", true}, - {"CheckHashtable", AlignPropertyValuePairs} - }}, - {"PSUseCorrectCasing", new Hashtable { - {"Enable", UseCorrectCasing} - }}, - }} - }; - } - } - - /// - /// Code folding settings - /// - public class CodeFoldingSettings - { - /// - /// Whether the folding is enabled. Default is true as per VSCode - /// - public bool Enable { get; set; } = true; - - /// - /// Whether to show or hide the last line of a folding region. Default is true as per VSCode - /// - public bool ShowLastLine { get; set; } = true; - - /// - /// Update these settings from another settings object - /// - public void Update( - CodeFoldingSettings settings, - ILogger logger) - { - if (settings != null) { - if (this.Enable != settings.Enable) { - this.Enable = settings.Enable; - logger.LogDebug(string.Format("Using Code Folding Enabled - {0}", this.Enable)); - } - if (this.ShowLastLine != settings.ShowLastLine) { - this.ShowLastLine = settings.ShowLastLine; - logger.LogDebug(string.Format("Using Code Folding ShowLastLine - {0}", this.ShowLastLine)); - } - } - } - } - - /// - /// Additional settings from the Language Client that affect Language Server operations but - /// do not exist under the 'powershell' section - /// - public class EditorFileSettings - { - /// - /// Exclude files globs consists of hashtable with the key as the glob and a boolean value to indicate if the - /// the glob is in effect. - /// - public Dictionary Exclude { get; set; } - } - - /// - /// Additional settings from the Language Client that affect Language Server operations but - /// do not exist under the 'powershell' section - /// - public class EditorSearchSettings - { - /// - /// Exclude files globs consists of hashtable with the key as the glob and a boolean value to indicate if the - /// the glob is in effect. - /// - public Dictionary Exclude { get; set; } - /// - /// Whether to follow symlinks when searching - /// - public bool FollowSymlinks { get; set; } = true; - } - - public class LanguageServerSettingsWrapper - { - // NOTE: This property is capitalized as 'Powershell' because the - // mode name sent from the client is written as 'powershell' and - // JSON.net is using camelCasing. - public LanguageServerSettings Powershell { get; set; } - - // NOTE: This property is capitalized as 'Files' because the - // mode name sent from the client is written as 'files' and - // JSON.net is using camelCasing. - public EditorFileSettings Files { get; set; } - - // NOTE: This property is capitalized as 'Search' because the - // mode name sent from the client is written as 'search' and - // JSON.net is using camelCasing. - public EditorSearchSettings Search { get; set; } - } -} diff --git a/src/PowerShellEditorServices.Engine/Logging/LoggerExtensions.cs b/src/PowerShellEditorServices.Engine/Logging/LoggerExtensions.cs index 9ee76baa2..785a72d83 100644 --- a/src/PowerShellEditorServices.Engine/Logging/LoggerExtensions.cs +++ b/src/PowerShellEditorServices.Engine/Logging/LoggerExtensions.cs @@ -1,8 +1,13 @@ +// +// 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 System.Runtime.CompilerServices; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Logging { internal static class LoggerExtensions { diff --git a/src/PowerShellEditorServices.Engine/Server/NamedPipePsesLanguageServer.cs b/src/PowerShellEditorServices.Engine/Server/NamedPipePsesLanguageServer.cs index c47cd1c8d..08086d5d8 100644 --- a/src/PowerShellEditorServices.Engine/Server/NamedPipePsesLanguageServer.cs +++ b/src/PowerShellEditorServices.Engine/Server/NamedPipePsesLanguageServer.cs @@ -11,6 +11,8 @@ using System.Security.AccessControl; using System.Security.Principal; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Hosting; +using Microsoft.PowerShell.EditorServices.Utility; namespace Microsoft.PowerShell.EditorServices.Engine.Server { diff --git a/src/PowerShellEditorServices.Engine/Server/PsesLanguageServer.cs b/src/PowerShellEditorServices.Engine/Server/PsesLanguageServer.cs index 819ce9aa7..f0ce7f920 100644 --- a/src/PowerShellEditorServices.Engine/Server/PsesLanguageServer.cs +++ b/src/PowerShellEditorServices.Engine/Server/PsesLanguageServer.cs @@ -12,12 +12,11 @@ using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Extensions; -using Microsoft.PowerShell.EditorServices.Host; -using Microsoft.PowerShell.EditorServices.Templates; -using Microsoft.PowerShell.EditorServices.TextDocument; +using Microsoft.PowerShell.EditorServices.Engine.Handlers; +using Microsoft.PowerShell.EditorServices.Engine.Hosting; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; using OmniSharp.Extensions.LanguageServer.Server; -using PowerShellEditorServices.Engine.Services.Handlers; namespace Microsoft.PowerShell.EditorServices.Engine.Server { diff --git a/src/PowerShellEditorServices.Engine/Server/StdioPsesLanguageServer.cs b/src/PowerShellEditorServices.Engine/Server/StdioPsesLanguageServer.cs index 462dcd30f..0da4d961e 100644 --- a/src/PowerShellEditorServices.Engine/Server/StdioPsesLanguageServer.cs +++ b/src/PowerShellEditorServices.Engine/Server/StdioPsesLanguageServer.cs @@ -7,6 +7,7 @@ using System.IO; using System.Management.Automation.Host; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Hosting; namespace Microsoft.PowerShell.EditorServices.Engine.Server { diff --git a/src/PowerShellEditorServices.Engine/Services/Analysis/AnalysisService.cs b/src/PowerShellEditorServices.Engine/Services/Analysis/AnalysisService.cs index 75db008a6..d36e497d2 100644 --- a/src/PowerShellEditorServices.Engine/Services/Analysis/AnalysisService.cs +++ b/src/PowerShellEditorServices.Engine/Services/Analysis/AnalysisService.cs @@ -16,8 +16,9 @@ using OmniSharp.Extensions.LanguageServer.Protocol.Server; using System.Threading; using System.Collections.Concurrent; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services { /// /// Provides a high-level service for performing semantic analysis diff --git a/src/PowerShellEditorServices.Engine/Services/CodeLens/CodeLensData.cs b/src/PowerShellEditorServices.Engine/Services/CodeLens/CodeLensData.cs index 15fff728d..8768e2555 100644 --- a/src/PowerShellEditorServices.Engine/Services/CodeLens/CodeLensData.cs +++ b/src/PowerShellEditorServices.Engine/Services/CodeLens/CodeLensData.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.CodeLenses +namespace Microsoft.PowerShell.EditorServices.Engine.CodeLenses { /// /// Represents data expected back in an LSP CodeLens response. diff --git a/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLensProvider.cs b/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLensProvider.cs index fab101580..06921c67c 100644 --- a/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLensProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLensProvider.cs @@ -3,11 +3,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System.Threading; -using System.Threading.Tasks; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices.CodeLenses +namespace Microsoft.PowerShell.EditorServices.Engine.CodeLenses { /// /// Specifies the contract for a Code Lens provider. diff --git a/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLenses.cs b/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLenses.cs index 6bca0c9be..bafd13bbc 100644 --- a/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLenses.cs +++ b/src/PowerShellEditorServices.Engine/Services/CodeLens/ICodeLenses.cs @@ -4,9 +4,10 @@ // using System.Collections.Generic; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices.CodeLenses +namespace Microsoft.PowerShell.EditorServices.Engine.CodeLenses { /// /// Specifies the contract for an implementation of diff --git a/src/PowerShellEditorServices.Engine/Services/CodeLens/PesterCodeLensProvider.cs b/src/PowerShellEditorServices.Engine/Services/CodeLens/PesterCodeLensProvider.cs index 3d7d85556..d2b7daaf4 100644 --- a/src/PowerShellEditorServices.Engine/Services/CodeLens/PesterCodeLensProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/CodeLens/PesterCodeLensProvider.cs @@ -4,13 +4,13 @@ // using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Engine.Utility; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices.CodeLenses +namespace Microsoft.PowerShell.EditorServices.Engine.CodeLenses { internal class PesterCodeLensProvider : ICodeLensProvider { diff --git a/src/PowerShellEditorServices.Engine/Services/CodeLens/ReferencesCodeLensProvider.cs b/src/PowerShellEditorServices.Engine/Services/CodeLens/ReferencesCodeLensProvider.cs index 5e1c16581..2c1862d59 100644 --- a/src/PowerShellEditorServices.Engine/Services/CodeLens/ReferencesCodeLensProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/CodeLens/ReferencesCodeLensProvider.cs @@ -5,16 +5,16 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading; -using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Engine.Utility; +using Microsoft.PowerShell.EditorServices.Utility; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -using PowerShellEditorServices.Engine.Utility; -namespace Microsoft.PowerShell.EditorServices.CodeLenses +namespace Microsoft.PowerShell.EditorServices.Engine.CodeLenses { /// /// Provides the "reference" code lens by extracting document symbols. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoiceDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoiceDetails.cs index d8121b6c1..ece5bd4ae 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoiceDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoiceDetails.cs @@ -6,7 +6,7 @@ using System; using System.Management.Automation.Host; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Contains the details about a choice that should be displayed diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoicePromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoicePromptHandler.cs index b4524789f..9f9557920 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoicePromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ChoicePromptHandler.cs @@ -11,7 +11,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Indicates the style of prompt to be displayed. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CollectionFieldDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CollectionFieldDetails.cs index 80ae62b5f..e9a6fb425 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CollectionFieldDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CollectionFieldDetails.cs @@ -6,7 +6,7 @@ using System; using System.Collections; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Contains the details of an colleciton input field shown diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleChoicePromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleChoicePromptHandler.cs index e5ed4472c..976ff4533 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleChoicePromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleChoicePromptHandler.cs @@ -6,7 +6,7 @@ using System.Linq; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a standard implementation of ChoicePromptHandler diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleInputPromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleInputPromptHandler.cs index 6e804f86e..be274122c 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleInputPromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleInputPromptHandler.cs @@ -6,7 +6,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a standard implementation of InputPromptHandler diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleProxy.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleProxy.cs index b9312ca7c..00c2e13e6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleProxy.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleProxy.cs @@ -8,7 +8,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides asynchronous implementations of the API's as well as diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleReadLine.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleReadLine.cs index 466e10764..9f5648309 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleReadLine.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/ConsoleReadLine.cs @@ -9,7 +9,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { using System; using System.Management.Automation; diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CredentialFieldDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CredentialFieldDetails.cs index 4b4452f2b..edcbc2fd6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CredentialFieldDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/CredentialFieldDetails.cs @@ -7,7 +7,7 @@ using System.Management.Automation; using System.Security; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Contains the details of a PSCredential field shown diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/FieldDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/FieldDetails.cs index 9fc80252e..88274be04 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/FieldDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/FieldDetails.cs @@ -11,7 +11,7 @@ using System.Management.Automation.Host; using System.Reflection; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Contains the details of an input field shown from an diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/IConsoleOperations.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/IConsoleOperations.cs index b3fb58561..c124c5cf4 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/IConsoleOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/IConsoleOperations.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides platform specific console utilities. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/InputPromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/InputPromptHandler.cs index 2b5c9bd23..442266a92 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/InputPromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/InputPromptHandler.cs @@ -12,7 +12,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a base implementation for IPromptHandler classes diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/PromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/PromptHandler.cs index 0de8a91b5..1bcdec99e 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/PromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/PromptHandler.cs @@ -6,7 +6,7 @@ using System; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Defines an abstract base class for prompt handler implementations. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalChoicePromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalChoicePromptHandler.cs index 174c15a11..9cc303bf4 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalChoicePromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalChoicePromptHandler.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a standard implementation of ChoicePromptHandler diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalInputPromptHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalInputPromptHandler.cs index 4d95bc92c..245a036c2 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalInputPromptHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/TerminalInputPromptHandler.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a standard implementation of InputPromptHandler diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/UnixConsoleOperations.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/UnixConsoleOperations.cs index e51547a10..9d715561f 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/UnixConsoleOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/UnixConsoleOperations.cs @@ -9,7 +9,7 @@ using Microsoft.PowerShell.EditorServices.Utility; using UnixConsoleEcho; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class UnixConsoleOperations : IConsoleOperations { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/WindowsConsoleOperations.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/WindowsConsoleOperations.cs index 493e66930..c1118b584 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/WindowsConsoleOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Console/WindowsConsoleOperations.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Console +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class WindowsConsoleOperations : IConsoleOperations { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/EditorOperationsService.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/EditorOperationsService.cs index 6d651acde..5d42a56d6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/EditorOperationsService.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/EditorOperationsService.cs @@ -3,13 +3,14 @@ // 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.Engine.Handlers; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Services.Handlers; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services { internal class EditorOperationsService : IEditorOperations { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/ExtensionService.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/ExtensionService.cs index 8ecc19300..983d8354a 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/ExtensionService.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/ExtensionService.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.LanguageServer; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; using OmniSharp.Extensions.LanguageServer.Protocol.Server; using System; using System.Collections.Generic; using System.Management.Automation; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services { /// /// Provides a high-level service which enables PowerShell scripts diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommand.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommand.cs index 8a7b80cef..193878f2b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommand.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommand.cs @@ -5,7 +5,7 @@ using System.Management.Automation; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides details about a command that has been registered diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommandAttribute.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommandAttribute.cs index 71b96d300..c43becca3 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommandAttribute.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorCommandAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides an attribute that can be used to target PowerShell diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorContext.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorContext.cs index 83e94a7a5..c2a1d0a95 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorContext.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorContext.cs @@ -6,8 +6,9 @@ using System; using System.Linq; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides context for the host editor at the time of creation. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorObject.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorObject.cs index 44a72a6c8..a9643104f 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorObject.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorObject.cs @@ -6,7 +6,7 @@ using System; using System.Reflection; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides the entry point of the extensibility API, inserted into diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorRequests.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorRequests.cs index 38e5c80f8..a4c293ced 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorRequests.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorRequests.cs @@ -5,7 +5,7 @@ using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { public class ExtensionCommandAddedNotification { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWindow.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWindow.cs index 8d241559a..d69649510 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWindow.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWindow.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.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a PowerShell-facing API which allows scripts to diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWorkspace.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWorkspace.cs index 4eb22de4a..32670d74b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWorkspace.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/EditorWorkspace.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.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a PowerShell-facing API which allows scripts to diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/FileContext.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/FileContext.cs index ace8f5271..6ed9a64f2 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/FileContext.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/FileContext.cs @@ -6,8 +6,9 @@ using System; using System.IO; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides context for a file that is open in the editor. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/IEditorOperations.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/IEditorOperations.cs index 4e3f532fd..2435930cd 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/IEditorOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Extensions/IEditorOperations.cs @@ -4,8 +4,9 @@ // using System.Threading.Tasks; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Extensions +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides an interface that must be implemented by an editor diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/EvaluateHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/EvaluateHandler.cs index 61b3dae51..04a8c01ab 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/EvaluateHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/EvaluateHandler.cs @@ -1,10 +1,14 @@ -using System; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class EvaluateHandler : IEvaluateHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ExpandAliasHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ExpandAliasHandler.cs index bab5d3ee1..1f9677c46 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ExpandAliasHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ExpandAliasHandler.cs @@ -8,11 +8,11 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/expandAlias")] public interface IExpandAliasHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommandHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommandHandler.cs index aee02fe1b..0cffb060a 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommandHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommandHandler.cs @@ -8,11 +8,11 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/getCommand")] public interface IGetCommandHandler : IJsonRpcRequestHandler> { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommentHelpHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommentHelpHandler.cs index e00391880..e0f5289c7 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommentHelpHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetCommentHelpHandler.cs @@ -1,14 +1,19 @@ -using System; +// +// 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 System.Collections.Generic; using System.Linq; using System.Management.Automation.Language; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class GetCommentHelpHandler : IGetCommentHelpHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetVersionHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetVersionHandler.cs index 4b57ecd39..03c73b7d4 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetVersionHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/GetVersionHandler.cs @@ -1,10 +1,15 @@ +// +// 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 System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Utility; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class GetVersionHandler : IGetVersionHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IEvaluateHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IEvaluateHandler.cs index 1fd053a0f..90a7e18ee 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IEvaluateHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IEvaluateHandler.cs @@ -1,7 +1,12 @@ -using OmniSharp.Extensions.Embedded.MediatR; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("evaluate")] public interface IEvaluateHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetCommentHelpHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetCommentHelpHandler.cs index 85c2f00ad..142d78e8f 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetCommentHelpHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetCommentHelpHandler.cs @@ -7,7 +7,7 @@ using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices.Protocol.LanguageServer +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/getCommentHelp")] public interface IGetCommentHelpHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetPSHostProcessesHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetPSHostProcessesHandler.cs index f5a366c1d..61b59623e 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetPSHostProcessesHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetPSHostProcessesHandler.cs @@ -1,7 +1,12 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/getPSHostProcesses")] public interface IGetPSHostProcessesHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetRunspaceHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetRunspaceHandler.cs index dcd94c1e6..039f60563 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetRunspaceHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetRunspaceHandler.cs @@ -1,7 +1,12 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/getRunspace")] public interface IGetRunspaceHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetVersionHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetVersionHandler.cs index 253e34daa..afaa4f4ab 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetVersionHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IGetVersionHandler.cs @@ -1,8 +1,13 @@ -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 Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/getVersion")] public interface IGetVersionHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IInvokeExtensionCommandHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IInvokeExtensionCommandHandler.cs index e44825c95..465bf1a5b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IInvokeExtensionCommandHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/IInvokeExtensionCommandHandler.cs @@ -1,8 +1,13 @@ -using OmniSharp.Extensions.Embedded.MediatR; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/invokeExtensionCommand")] public interface IInvokeExtensionCommandHandler : IJsonRpcNotificationHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ITemplateHandlers.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ITemplateHandlers.cs index 9fefae8d1..13f2cf4e3 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ITemplateHandlers.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ITemplateHandlers.cs @@ -6,7 +6,7 @@ using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/getProjectTemplates")] public interface IGetProjectTemplatesHandler : IJsonRpcRequestHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/InvokeExtensionCommandHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/InvokeExtensionCommandHandler.cs index fee04ff84..51d0b2e6a 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/InvokeExtensionCommandHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/InvokeExtensionCommandHandler.cs @@ -1,10 +1,16 @@ -using System.Threading; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Extensions; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; using OmniSharp.Extensions.Embedded.MediatR; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { internal class InvokeExtensionCommandHandler : IInvokeExtensionCommandHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/PSHostProcessAndRunspaceHandlers.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/PSHostProcessAndRunspaceHandlers.cs index 52b8b3411..5337ffb6f 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/PSHostProcessAndRunspaceHandlers.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/PSHostProcessAndRunspaceHandlers.cs @@ -1,14 +1,20 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using System.Collections.Generic; -using System.Management.Automation; using System.Management.Automation.Runspaces; using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { + using System.Management.Automation; + public class PSHostProcessAndRunspaceHandlers : IGetPSHostProcessesHandler, IGetRunspaceHandler { private readonly ILogger _logger; diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ShowHelpHandler.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ShowHelpHandler.cs index aecf58083..348c1893b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ShowHelpHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/ShowHelpHandler.cs @@ -7,11 +7,11 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.JsonRpc; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { [Serial, Method("powerShell/showHelp")] public interface IShowHelpHandler : IJsonRpcNotificationHandler { } diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/TemplateHandlers.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/TemplateHandlers.cs index d02bddcc9..59e4e16cb 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/TemplateHandlers.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Handlers/TemplateHandlers.cs @@ -7,10 +7,10 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.Templates; +using Microsoft.PowerShell.EditorServices.Engine.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class TemplateHandlers : IGetProjectTemplatesHandler, INewProjectFromTemplateHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/PowerShellContextService.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/PowerShellContextService.cs index b4dfeea3e..b46eff1e8 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/PowerShellContextService.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/PowerShellContextService.cs @@ -17,14 +17,15 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Engine; -using Microsoft.PowerShell.EditorServices.Session; using Microsoft.PowerShell.EditorServices.Utility; -using PowerShellEditorServices.Engine.Services.Handlers; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services { using System.Management.Automation; + using Microsoft.PowerShell.EditorServices.Engine.Handlers; + using Microsoft.PowerShell.EditorServices.Engine.Hosting; + using Microsoft.PowerShell.EditorServices.Engine.Logging; + using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; /// /// Manages the lifetime and usage of a PowerShell session. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs index 03ce2abe9..e9f1b45e0 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Capabilities/DscBreakpointCapability.cs @@ -6,7 +6,7 @@ //using System.Linq; //using System.Threading.Tasks; -//namespace Microsoft.PowerShell.EditorServices.Session.Capabilities +//namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext //{ // using Microsoft.Extensions.Logging; // using Microsoft.PowerShell.EditorServices.Utility; diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionOptions.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionOptions.cs index a1071606f..fa2fd0f1e 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionOptions.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionOptions.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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Defines options for the execution of a command. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatus.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatus.cs index 233d0499e..daf6e499b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatus.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatus.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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Enumerates the possible execution results that can occur after diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatusChangedEventArgs.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatusChangedEventArgs.cs index cd2dcaaf2..ffb4fb5de 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatusChangedEventArgs.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionStatusChangedEventArgs.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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Contains details about an executed diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionTarget.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionTarget.cs index 70ec3cb6f..79c8a860c 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionTarget.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ExecutionTarget.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.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Represents the different API's available for executing commands. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs index 52a94daae..43ab96e41 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHost.cs @@ -4,14 +4,13 @@ // using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Engine; -using Microsoft.PowerShell.EditorServices.Session; +using Microsoft.PowerShell.EditorServices.Engine.Hosting; using System; using System.Management.Automation; using System.Management.Automation.Host; using System.Management.Automation.Runspaces; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides an implementation of the PSHost class for the diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs index e8139beed..8d4007725 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs @@ -12,13 +12,12 @@ using System.Linq; using System.Security; using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Console; using System.Threading; -using Microsoft.PowerShell.EditorServices.Session; using System.Globalization; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Logging; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides an implementation of the PSHostUserInterface class diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostInput.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostInput.cs index 95da783db..d22da8cf9 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostInput.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostInput.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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides methods for integrating with the host's input system. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostOutput.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostOutput.cs index 4f36bc54f..53c72b573 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostOutput.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/IHostOutput.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a simplified interface for writing output to a diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptEvents.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptEvents.cs index 72de43587..99bfb6035 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptEvents.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptEvents.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.Messages +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { public class ShowChoicePromptRequest { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptHandlers.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptHandlers.cs index 38a619741..b433354fd 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptHandlers.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/PromptHandlers.cs @@ -4,15 +4,13 @@ // using System; -using Microsoft.PowerShell.EditorServices.Console; using System.Threading.Tasks; using System.Threading; using System.Security; using Microsoft.Extensions.Logging; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using Microsoft.PowerShell.EditorServices.Protocol.Messages; -namespace Microsoft.PowerShell.EditorServices.Host +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class ProtocolChoicePromptHandler : ConsoleChoicePromptHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/ProtocolPSHostUserInterface.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/ProtocolPSHostUserInterface.cs index 3bbec39ae..d3e79f54c 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/ProtocolPSHostUserInterface.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/ProtocolPSHostUserInterface.cs @@ -4,13 +4,12 @@ // using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Console; using OmniSharp.Extensions.LanguageServer.Protocol.Server; using System; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Host +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class ProtocolPSHostUserInterface : EditorServicesPSHostUserInterface { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/SimplePSHostRawUserInterface.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/SimplePSHostRawUserInterface.cs index 3514469e9..4d13abd5f 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/SimplePSHostRawUserInterface.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/SimplePSHostRawUserInterface.cs @@ -7,7 +7,7 @@ using System.Management.Automation.Host; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides an simple implementation of the PSHostRawUserInterface class. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostRawUserInterface.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostRawUserInterface.cs index c9e05c7e3..02f11057c 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostRawUserInterface.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostRawUserInterface.cs @@ -4,13 +4,12 @@ // using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Console; using System; using System.Management.Automation; using System.Management.Automation.Host; using System.Threading; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides an implementation of the PSHostRawUserInterface class diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs index 1ba2a7fc1..b57fcaec7 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs @@ -3,16 +3,15 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using Microsoft.PowerShell.EditorServices.Console; +using System; +using System.Management.Automation.Host; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { - using System; using System.Management.Automation; - using System.Management.Automation.Host; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Extensions.Logging; /// /// Provides an EditorServicesPSHostUserInterface implementation diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IPromptContext.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IPromptContext.cs index 157715e7d..d14611cee 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IPromptContext.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IPromptContext.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides methods for interacting with implementations of ReadLine. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IRunspaceCapability.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IRunspaceCapability.cs index 38d14fb96..a79d15c6b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IRunspaceCapability.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IRunspaceCapability.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.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal interface IRunspaceCapability { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IVersionSpecificOperations.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IVersionSpecificOperations.cs index c210ff47b..d02c65df5 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IVersionSpecificOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/IVersionSpecificOperations.cs @@ -8,7 +8,7 @@ using System.Management.Automation.Host; using System.Management.Automation.Runspaces; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal interface IVersionSpecificOperations { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/InvocationEventQueue.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/InvocationEventQueue.cs index deeec8939..0c41bdc8b 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/InvocationEventQueue.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/InvocationEventQueue.cs @@ -12,7 +12,7 @@ using System.Threading; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { using System.Management.Automation; diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/LegacyReadLineContext.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/LegacyReadLineContext.cs index 281b410c2..508ddb9c0 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/LegacyReadLineContext.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/LegacyReadLineContext.cs @@ -5,9 +5,8 @@ using System.Threading; using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Console; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class LegacyReadLineContext : IPromptContext { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputType.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputType.cs index ad67f6891..384d60820 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputType.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Enumerates the types of output lines that will be sent diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputWrittenEventArgs.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputWrittenEventArgs.cs index 0e4663094..264576ad6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputWrittenEventArgs.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/OutputWrittenEventArgs.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides details about output that has been written to the diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLinePromptContext.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLinePromptContext.cs index 9058579e8..ce3c427f8 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLinePromptContext.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLinePromptContext.cs @@ -9,13 +9,14 @@ using System.Threading.Tasks; using System; using System.Management.Automation.Runspaces; -using Microsoft.PowerShell.EditorServices.Console; -namespace Microsoft.PowerShell.EditorServices.Session { +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext +{ using System.Management.Automation; using Microsoft.Extensions.Logging; - internal class PSReadLinePromptContext : IPromptContext { + internal class PSReadLinePromptContext : IPromptContext + { private const string ReadLineScript = @" [System.Diagnostics.DebuggerHidden()] [System.Diagnostics.DebuggerStepThrough()] diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLineProxy.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLineProxy.cs index 494a3f9f7..548a0a2c6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLineProxy.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PSReadLineProxy.cs @@ -7,7 +7,7 @@ using System.Reflection; using Microsoft.Extensions.Logging; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class PSReadLineProxy { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PipelineExecutionRequest.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PipelineExecutionRequest.cs index f2d61192c..dc9bb8962 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PipelineExecutionRequest.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PipelineExecutionRequest.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal interface IPipelineExecutionRequest { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShell5Operations.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShell5Operations.cs index a001d84bf..e6764f65f 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShell5Operations.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShell5Operations.cs @@ -9,7 +9,7 @@ using System.Management.Automation.Host; using System.Management.Automation.Runspaces; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { internal class PowerShell5Operations : IVersionSpecificOperations { diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellContextState.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellContextState.cs index 6ebdbc947..d5c46dcaa 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellContextState.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellContextState.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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Enumerates the possible states for a PowerShellContext. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellExecutionResult.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellExecutionResult.cs index 3c941b5aa..f9261bbf9 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellExecutionResult.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellExecutionResult.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.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Enumerates the possible execution results that can occur after diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellVersionDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellVersionDetails.cs index d0b8e56e2..682c83228 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellVersionDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PowerShellVersionDetails.cs @@ -8,7 +8,7 @@ using System.Collections; using System.Management.Automation.Runspaces; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Defines the possible enumeration values for the PowerShell process architecture. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ProgressDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ProgressDetails.cs index d2ec4b1bd..f6afc5829 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ProgressDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ProgressDetails.cs @@ -5,7 +5,7 @@ using System.Management.Automation; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides details about the progress of a particular activity. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNest.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNest.cs index a39f25f34..7150d46f6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNest.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNest.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { using System; using System.Management.Automation; diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrame.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrame.cs index cae7dfb8a..05fbbe5fa 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrame.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrame.cs @@ -8,7 +8,7 @@ using System.Threading.Tasks; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { using System.Management.Automation; diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrameType.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrameType.cs index b42b42098..4f360edab 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrameType.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/PromptNestFrameType.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { [Flags] internal enum PromptNestFrameType diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RemoteFileManager.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RemoteFileManager.cs index 0b24dfa48..1fe3d4086 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RemoteFileManager.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RemoteFileManager.cs @@ -4,7 +4,8 @@ // using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Extensions; +using Microsoft.PowerShell.EditorServices.Engine.Logging; +using Microsoft.PowerShell.EditorServices.Utility; using System; using System.Collections.Generic; using System.Diagnostics; @@ -15,7 +16,7 @@ using System.Text; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Manages files that are accessed from a remote PowerShell session. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceChangedEventArgs.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceChangedEventArgs.cs index 7efaf57d8..f1e558c89 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceChangedEventArgs.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceChangedEventArgs.cs @@ -3,7 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices.Session +using Microsoft.PowerShell.EditorServices.Utility; + +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Defines the set of actions that will cause the runspace to be changed. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceDetails.cs index 1188d20a1..94dfee7a1 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceDetails.cs @@ -8,8 +8,9 @@ using System.Management.Automation.Runspaces; using System.Collections.Generic; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Specifies the possible types of a runspace. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceHandle.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceHandle.cs index ab0906fe6..70b643b0c 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceHandle.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/RunspaceHandle.cs @@ -7,7 +7,7 @@ using System.Management.Automation.Host; using System.Management.Automation.Runspaces; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides a handle to the runspace that is managed by diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionDetails.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionDetails.cs index 2347ce69a..8da235340 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionDetails.cs @@ -6,8 +6,9 @@ using System; using System.Management.Automation; using System.Collections; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides details about the current PowerShell session. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionStateChangedEventArgs.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionStateChangedEventArgs.cs index 1d285636e..9cbcf7765 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionStateChangedEventArgs.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/SessionStateChangedEventArgs.cs @@ -5,7 +5,7 @@ using System; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides details about a change in state of a PowerShellContext. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ThreadController.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ThreadController.cs index 8720e3fa7..fead192b6 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ThreadController.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Session/ThreadController.cs @@ -10,7 +10,7 @@ using System.Threading.Tasks; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Session +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides the ability to route PowerShell command invocations to a specific thread. diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/TemplateService.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/TemplateService.cs index 8ac5cfc8e..fff0b60ba 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/TemplateService.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/TemplateService.cs @@ -4,14 +4,15 @@ // using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Handlers; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; using Microsoft.PowerShell.EditorServices.Utility; -using PowerShellEditorServices.Engine.Services.Handlers; using System; using System.Linq; using System.Management.Automation; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.Templates +namespace Microsoft.PowerShell.EditorServices.Engine.Services { /// /// Provides a service for listing PowerShell project templates and creating diff --git a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Utilities/CommandHelpers.cs b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Utilities/CommandHelpers.cs index a73689dd4..4682d0dd4 100644 --- a/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Utilities/CommandHelpers.cs +++ b/src/PowerShellEditorServices.Engine/Services/PowerShellContext/Utilities/CommandHelpers.cs @@ -7,8 +7,9 @@ using System.Linq; using System.Management.Automation; using System.Threading.Tasks; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext { /// /// Provides utility methods for working with PowerShell commands. diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbolProvider.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbolProvider.cs index d971b9b38..604917c0d 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbolProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbolProvider.cs @@ -4,8 +4,9 @@ // using System.Collections.Generic; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Specifies the contract for a document symbols provider. diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbols.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbols.cs index 42472203e..23c14d850 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbols.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/IDocumentSymbols.cs @@ -5,8 +5,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Specifies the contract for an implementation of diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/ParameterSetSignatures.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/ParameterSetSignatures.cs index 072917e06..3fe325355 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/ParameterSetSignatures.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/ParameterSetSignatures.cs @@ -6,9 +6,9 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Management.Automation; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// A class for containing the commandName, the command's @@ -17,6 +17,7 @@ namespace Microsoft.PowerShell.EditorServices public class ParameterSetSignatures { #region Properties + /// /// Gets the name of the command /// @@ -31,6 +32,7 @@ public class ParameterSetSignatures /// Gets the script extent of the command /// public ScriptRegion ScriptRegion { get; internal set; } + #endregion /// diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/PesterDocumentSymbolProvider.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/PesterDocumentSymbolProvider.cs index 87a19778e..8d1425db2 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/PesterDocumentSymbolProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/PesterDocumentSymbolProvider.cs @@ -7,8 +7,9 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Provides an IDocumentSymbolProvider implementation for diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/PsdDocumentSymbolProvider.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/PsdDocumentSymbolProvider.cs index 695ed2c02..c5cb6099b 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/PsdDocumentSymbolProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/PsdDocumentSymbolProvider.cs @@ -7,8 +7,9 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Provides an IDocumentSymbolProvider implementation for diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptDocumentSymbolProvider.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptDocumentSymbolProvider.cs index 2c11747f2..63416c516 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptDocumentSymbolProvider.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptDocumentSymbolProvider.cs @@ -7,8 +7,9 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Provides an IDocumentSymbolProvider implementation for diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptExtent.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptExtent.cs index d695de649..00001f7dd 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptExtent.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/ScriptExtent.cs @@ -6,7 +6,7 @@ using System; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Provides a default IScriptExtent implementation diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolDetails.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolDetails.cs index 3604481cc..d8866b024 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolDetails.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolDetails.cs @@ -6,9 +6,9 @@ using System.Diagnostics; using System.Management.Automation; using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Provides detailed information for a given symbol. diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolReference.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolReference.cs index 643ab430b..963ea8b81 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolReference.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolReference.cs @@ -3,11 +3,11 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System; using System.Diagnostics; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// A class that holds the type, name, script extent, and source line of a symbol diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolType.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolType.cs index 2dba9a0a0..9344e5ef3 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolType.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolType.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.PowerShell.EditorServices.Engine.Services.Symbols { /// /// A way to define symbols on a higher level diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolsService.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolsService.cs index 216a885d1..1bde8b9ff 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolsService.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/SymbolsService.cs @@ -14,10 +14,13 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Symbols; -using PowerShellEditorServices.Engine.Utility; +using Microsoft.PowerShell.EditorServices.Engine.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services { /// /// Provides a high-level service for performing code completion and diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/AstOperations.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/AstOperations.cs index fd54cc7d1..86179305e 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/AstOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/AstOperations.cs @@ -13,9 +13,10 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// Provides common operations for the syntax tree of a parsed script. diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindCommandVisitor.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindCommandVisitor.cs index 254bf6ba3..dcc45eb3b 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindCommandVisitor.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindCommandVisitor.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// The vistior used to find the commandAst of a specific location in an AST diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDeclarationVisitor.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDeclarationVisitor.cs index c9842c9ef..e159af4c8 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDeclarationVisitor.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDeclarationVisitor.cs @@ -6,7 +6,7 @@ using System; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// The visitor used to find the definition of a symbol diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDotSourcedVisitor.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDotSourcedVisitor.cs index de42c7753..6caec1e49 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDotSourcedVisitor.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindDotSourcedVisitor.cs @@ -6,9 +6,9 @@ using System; using System.Collections.Generic; using System.Management.Automation.Language; -using PowerShellEditorServices.Engine.Utility; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// The vistor used to find the dont sourced files in an AST diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindReferencesVisitor.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindReferencesVisitor.cs index 2dfb6d86b..5a12dd366 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindReferencesVisitor.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindReferencesVisitor.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// The visitor used to find the references of a symbol in a script's AST diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolVisitor.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolVisitor.cs index 06bdf8235..41eb8dc59 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolVisitor.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolVisitor.cs @@ -5,7 +5,7 @@ using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// The visitor used to find the the symbol at a specfic location in the AST diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor.cs index 9b2dc0dc6..95808be91 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices.Symbols +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { /// /// The visitor used to find all the symbols (function and class defs) in the AST. diff --git a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor2.cs b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor2.cs index 03628ee3e..2aedd1228 100644 --- a/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor2.cs +++ b/src/PowerShellEditorServices.Engine/Services/Symbols/Vistors/FindSymbolsVisitor2.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Symbols { // TODO: Restore this when we figure out how to support multiple // PS versions in the new PSES-as-a-module world (issue #276) diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferPosition.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferPosition.cs index effdd7660..c7e6bef79 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferPosition.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferPosition.cs @@ -5,7 +5,7 @@ using System.Diagnostics; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Provides details about a position in a file buffer. All diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferRange.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferRange.cs index 147eed042..986f3702e 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferRange.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/BufferRange.cs @@ -6,7 +6,7 @@ using System; using System.Diagnostics; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Provides details about a range between two positions in diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/CompletionResults.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/CompletionResults.cs index 433d4e5c3..308386d50 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/CompletionResults.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/CompletionResults.cs @@ -10,7 +10,7 @@ using System.Text.RegularExpressions; using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Provides the results of a single code completion request. diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/FileChange.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/FileChange.cs index 79f6925ea..f465f0826 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/FileChange.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/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.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Contains details relating to a content change in an open file. diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/FilePosition.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/FilePosition.cs index a7c9036c7..5b95905dd 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/FilePosition.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/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.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Provides details and operations for a buffer position in a diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/FoldingReference.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/FoldingReference.cs index 2bfe4874e..e0d5d7ac8 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/FoldingReference.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/FoldingReference.cs @@ -7,7 +7,7 @@ using System.Collections.Generic; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// A class that holds the information for a foldable region of text in a document diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeActionHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeActionHandler.cs index 7afd6f37e..522e3ba1d 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeActionHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeActionHandler.cs @@ -1,18 +1,21 @@ -using System; -using System.Collections.Concurrent; +// +// 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 System.Collections.Generic; -using System.ComponentModel; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using Newtonsoft.Json.Linq; -using OmniSharp.Extensions.JsonRpc.Client; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Services.Handlers; -namespace Microsoft.PowerShell.EditorServices.TextDocument +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { internal class CodeActionHandler : ICodeActionHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeLensHandlers.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeLensHandlers.cs index f83e35d18..46d96cacd 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeLensHandlers.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CodeLensHandlers.cs @@ -1,18 +1,25 @@ -using System; +// +// 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 System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.CodeLenses; +using Microsoft.PowerShell.EditorServices.Engine.CodeLenses; +using Microsoft.PowerShell.EditorServices.Engine.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class CodeLensHandlers : ICodeLensHandler, ICodeLensResolveHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CompletionHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CompletionHandler.cs index 0f4d81406..da14ce998 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CompletionHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/CompletionHandler.cs @@ -9,12 +9,16 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.PowerShellContext; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Utility; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace Microsoft.PowerShell.EditorServices.TextDocument +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { internal class CompletionHandler : ICompletionHandler, ICompletionResolveHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DefinitionHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DefinitionHandler.cs index 407408cf9..cd35f8ce1 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DefinitionHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DefinitionHandler.cs @@ -7,14 +7,15 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Utility; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Utility; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class DefinitionHandler : IDefinitionHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentHighlightHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentHighlightHandler.cs index 838d40331..ea1a2e11a 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentHighlightHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentHighlightHandler.cs @@ -4,16 +4,19 @@ // using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Engine.Utility; +using Microsoft.PowerShell.EditorServices.Utility; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Utility; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -namespace Microsoft.PowerShell.EditorServices.TextDocument +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class DocumentHighlightHandler : IDocumentHighlightHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentSymbolHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentSymbolHandler.cs index 6cbe8ace7..ed354fb04 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentSymbolHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/DocumentSymbolHandler.cs @@ -1,4 +1,9 @@ -using System; +// +// 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 System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -6,14 +11,16 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Utility; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Utility; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class DocumentSymbolHandler : IDocumentSymbolHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FoldingRangeHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FoldingRangeHandler.cs index 928eb5d03..54e8dfbca 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FoldingRangeHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FoldingRangeHandler.cs @@ -1,13 +1,19 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class FoldingRangeHandler : IFoldingRangeHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FormattingHandlers.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FormattingHandlers.cs index 4565d7ff8..bc93390c0 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FormattingHandlers.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/FormattingHandlers.cs @@ -1,14 +1,17 @@ -using System; -using System.Collections.Generic; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { internal class DocumentFormattingHandler : IDocumentFormattingHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/HoverHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/HoverHandler.cs index 633ef2900..cbc978694 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/HoverHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/HoverHandler.cs @@ -1,13 +1,20 @@ -using System.Collections.Generic; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class HoverHandler : IHoverHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/ReferencesHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/ReferencesHandler.cs index d49f7f8d2..c5f73a41b 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/ReferencesHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/ReferencesHandler.cs @@ -1,15 +1,21 @@ -using System.Collections.Generic; +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Utility; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Utility; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { class ReferencesHandler : IReferencesHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/SignatureHelpHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/SignatureHelpHandler.cs index 6636da589..102e71410 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/SignatureHelpHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/SignatureHelpHandler.cs @@ -7,12 +7,14 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class SignatureHelpHandler : ISignatureHelpHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/TextDocumentHandler.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/TextDocumentHandler.cs index d7ec17827..52538d2d7 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/TextDocumentHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/Handlers/TextDocumentHandler.cs @@ -1,10 +1,15 @@ +// +// 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 System.Collections.Generic; -using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.LanguageServer.Protocol; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; @@ -12,7 +17,7 @@ using OmniSharp.Extensions.LanguageServer.Protocol.Server; using OmniSharp.Extensions.LanguageServer.Protocol.Server.Capabilities; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { class TextDocumentHandler : ITextDocumentSyncHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFile.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFile.cs index 57f80c9c3..41563ec25 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFile.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFile.cs @@ -9,9 +9,10 @@ using System.Linq; using System.Management.Automation; using System.Management.Automation.Language; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Contains the details and contents of an open script file. diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFileMarker.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFileMarker.cs index a6f518c75..0269c2d3d 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFileMarker.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptFileMarker.cs @@ -8,8 +8,9 @@ using System.Collections.Generic; using System.Linq; using System.Management.Automation.Language; +using Microsoft.PowerShell.EditorServices.Utility; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Contains details for a code correction which can be applied from a ScriptFileMarker. diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptRegion.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptRegion.cs index d91ec865e..0ffee20b2 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptRegion.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/ScriptRegion.cs @@ -3,11 +3,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using OmniSharp.Extensions.LanguageServer.Protocol.Models; using System; using System.Management.Automation.Language; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// /// Contains details about a specific region of text in script file. diff --git a/src/PowerShellEditorServices.Engine/Services/TextDocument/TokenOperations.cs b/src/PowerShellEditorServices.Engine/Services/TextDocument/TokenOperations.cs index bffd0991a..8a3985573 100644 --- a/src/PowerShellEditorServices.Engine/Services/TextDocument/TokenOperations.cs +++ b/src/PowerShellEditorServices.Engine/Services/TextDocument/TokenOperations.cs @@ -3,13 +3,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -using System; using System.Collections.Generic; using System.Management.Automation.Language; using System.Text.RegularExpressions; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument { /// diff --git a/src/PowerShellEditorServices.Engine/Services/Workspace/ConfigurationService.cs b/src/PowerShellEditorServices.Engine/Services/Workspace/ConfigurationService.cs index 888b18ebe..2351adda1 100644 --- a/src/PowerShellEditorServices.Engine/Services/Workspace/ConfigurationService.cs +++ b/src/PowerShellEditorServices.Engine/Services/Workspace/ConfigurationService.cs @@ -3,7 +3,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. // -namespace Microsoft.PowerShell.EditorServices +using Microsoft.PowerShell.EditorServices.Engine.Services.Configuration; + +namespace Microsoft.PowerShell.EditorServices.Engine.Services { public class ConfigurationService { diff --git a/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/ConfigurationHandler.cs b/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/ConfigurationHandler.cs index c22ea8d90..5d2fc49d8 100644 --- a/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/ConfigurationHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/ConfigurationHandler.cs @@ -1,14 +1,21 @@ +// +// 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 System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Configuration; using OmniSharp.Extensions.Embedded.MediatR; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { internal class ConfigurationHandler : IDidChangeConfigurationHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs b/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs index 5e9c36752..d05a02dea 100644 --- a/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs +++ b/src/PowerShellEditorServices.Engine/Services/Workspace/Handlers/WorkspaceSymbolsHandler.cs @@ -1,17 +1,23 @@ +// +// 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 System.Collections.Generic; using System.IO; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Microsoft.PowerShell.EditorServices; -using Microsoft.PowerShell.EditorServices.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services; +using Microsoft.PowerShell.EditorServices.Engine.Services.Symbols; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; +using Microsoft.PowerShell.EditorServices.Utility; using OmniSharp.Extensions.LanguageServer.Protocol.Client.Capabilities; using OmniSharp.Extensions.LanguageServer.Protocol.Models; using OmniSharp.Extensions.LanguageServer.Protocol.Server; -using PowerShellEditorServices.Engine.Utility; -namespace PowerShellEditorServices.Engine.Services.Handlers +namespace Microsoft.PowerShell.EditorServices.Engine.Handlers { public class WorkspaceSymbolsHandler : IWorkspaceSymbolsHandler { diff --git a/src/PowerShellEditorServices.Engine/Services/Workspace/LanguageServerSettings.cs b/src/PowerShellEditorServices.Engine/Services/Workspace/LanguageServerSettings.cs index 7f2b3dfee..894df1d65 100644 --- a/src/PowerShellEditorServices.Engine/Services/Workspace/LanguageServerSettings.cs +++ b/src/PowerShellEditorServices.Engine/Services/Workspace/LanguageServerSettings.cs @@ -10,8 +10,9 @@ using System.Reflection; using System.Security; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Logging; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Configuration { public class LanguageServerSettings { diff --git a/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceFileSystemWrapper.cs b/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceFileSystemWrapper.cs index 116f29b38..6b53b10df 100644 --- a/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceFileSystemWrapper.cs +++ b/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceFileSystemWrapper.cs @@ -9,8 +9,9 @@ using System.Security; using Microsoft.Extensions.FileSystemGlobbing.Abstractions; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Engine.Logging; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services.Workspace { /// diff --git a/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceService.cs b/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceService.cs index 32cde6f7b..f8beeba70 100644 --- a/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceService.cs +++ b/src/PowerShellEditorServices.Engine/Services/Workspace/WorkspaceService.cs @@ -12,8 +12,11 @@ using System.Runtime.InteropServices; using Microsoft.Extensions.FileSystemGlobbing; using Microsoft.Extensions.Logging; +using Microsoft.PowerShell.EditorServices.Utility; +using Microsoft.PowerShell.EditorServices.Engine.Services.Workspace; +using Microsoft.PowerShell.EditorServices.Engine.Services.TextDocument; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Services { /// /// Manages a "workspace" of script files that are open for a particular diff --git a/src/PowerShellEditorServices.Engine/Services/CodeLens/IScriptExtentExtensions.cs b/src/PowerShellEditorServices.Engine/Utility/IScriptExtentExtensions.cs similarity index 93% rename from src/PowerShellEditorServices.Engine/Services/CodeLens/IScriptExtentExtensions.cs rename to src/PowerShellEditorServices.Engine/Utility/IScriptExtentExtensions.cs index 1f8ee1da1..db7148df0 100644 --- a/src/PowerShellEditorServices.Engine/Services/CodeLens/IScriptExtentExtensions.cs +++ b/src/PowerShellEditorServices.Engine/Utility/IScriptExtentExtensions.cs @@ -6,7 +6,7 @@ using System.Management.Automation.Language; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Engine.Utility { internal static class IScriptExtentExtensions { diff --git a/src/PowerShellEditorServices.Engine/Utility/PathUtils.cs b/src/PowerShellEditorServices.Engine/Utility/PathUtils.cs index 108c7d05f..13a8cccd0 100644 --- a/src/PowerShellEditorServices.Engine/Utility/PathUtils.cs +++ b/src/PowerShellEditorServices.Engine/Utility/PathUtils.cs @@ -1,8 +1,13 @@ +// +// 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 System.IO; using System.Runtime.InteropServices; -namespace PowerShellEditorServices.Engine.Utility +namespace Microsoft.PowerShell.EditorServices.Utility { internal class PathUtils { diff --git a/src/PowerShellEditorServices.Engine/Utility/Validate.cs b/src/PowerShellEditorServices.Engine/Utility/Validate.cs index a595bd6c9..20fba09e3 100644 --- a/src/PowerShellEditorServices.Engine/Utility/Validate.cs +++ b/src/PowerShellEditorServices.Engine/Utility/Validate.cs @@ -1,7 +1,12 @@ +// +// 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 System.Collections.Generic; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Utility { /// /// Provides common validation methods to simplify method diff --git a/src/PowerShellEditorServices.Engine/Utility/VersionUtils.cs b/src/PowerShellEditorServices.Engine/Utility/VersionUtils.cs index da99597b4..5406ba1b6 100644 --- a/src/PowerShellEditorServices.Engine/Utility/VersionUtils.cs +++ b/src/PowerShellEditorServices.Engine/Utility/VersionUtils.cs @@ -1,8 +1,13 @@ +// +// 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 System.Reflection; using System.Runtime.InteropServices; -namespace Microsoft.PowerShell.EditorServices +namespace Microsoft.PowerShell.EditorServices.Utility { /// /// General purpose common utilities to prevent reimplementation. diff --git a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs index 6597f494e..22f37a00b 100644 --- a/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs +++ b/test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs @@ -11,11 +11,10 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; -using Microsoft.PowerShell.EditorServices.Protocol.LanguageServer; +using Microsoft.PowerShell.EditorServices.Engine.Handlers; using Newtonsoft.Json.Linq; using OmniSharp.Extensions.LanguageServer.Client; using OmniSharp.Extensions.LanguageServer.Protocol.Models; -using PowerShellEditorServices.Engine.Services.Handlers; using Xunit; using Xunit.Abstractions; using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range;