Skip to content

Commit ac82a4b

Browse files
committed
Fix bad rename of EditorServices.PowerShellContext
In a previous commit, PowerShellSession was renamed to PowerShellContext. EditorServices.PowerShellSession was accidentally renamed to EditorServices.powerShellContext with a camel-cased name. This change corrects the casing on that property.
1 parent c4d31cf commit ac82a4b

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/PowerShellEditorServices.Host/DebugAdapter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected async Task HandleLaunchRequest(
101101
// Execute the given PowerShell script and send the response.
102102
// Note that we aren't waiting for execution to complete here
103103
// because the debugger could stop while the script executes.
104-
editorSession.powerShellContext
104+
editorSession.PowerShellContext
105105
.ExecuteScriptAtPath(launchParams.Program)
106106
.ContinueWith(
107107
async (t) =>
@@ -141,15 +141,15 @@ protected Task HandleDisconnectRequest(
141141
if (e.NewSessionState == PowerShellContextState.Ready)
142142
{
143143
await requestContext.SendResult(null);
144-
editorSession.powerShellContext.SessionStateChanged -= handler;
144+
editorSession.PowerShellContext.SessionStateChanged -= handler;
145145

146146
// TODO: Find a way to exit more gracefully!
147147
Environment.Exit(0);
148148
}
149149
};
150150

151-
editorSession.powerShellContext.SessionStateChanged += handler;
152-
editorSession.powerShellContext.AbortExecution();
151+
editorSession.PowerShellContext.SessionStateChanged += handler;
152+
editorSession.PowerShellContext.AbortExecution();
153153

154154
return Task.FromResult(true);
155155
}

src/PowerShellEditorServices.Host/LanguageServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ protected async Task HandleShowOnlineHelpRequest(
147147

148148
psCommand.AddScript(script);
149149

150-
var result = await editorSession.powerShellContext.ExecuteCommand<object>(
150+
var result = await editorSession.PowerShellContext.ExecuteCommand<object>(
151151
psCommand);
152152

153153
await requestContext.SendResult(null);
@@ -422,7 +422,7 @@ protected async Task HandleCompletionResolveRequest(
422422
if (completionItem.Kind == CompletionItemKind.Function)
423423
{
424424
RunspaceHandle runspaceHandle =
425-
await editorSession.powerShellContext.GetRunspaceHandle();
425+
await editorSession.PowerShellContext.GetRunspaceHandle();
426426

427427
// Get the documentation for the function
428428
CommandInfo commandInfo =

src/PowerShellEditorServices.Host/MessageLoop.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ async Task ListenForMessages()
129129
// Set up the PowerShell session
130130
this.editorSession = new EditorSession();
131131
this.editorSession.StartSession(this.consoleHost);
132-
this.editorSession.powerShellContext.OutputWritten += powerShellContext_OutputWritten;
132+
this.editorSession.PowerShellContext.OutputWritten += powerShellContext_OutputWritten;
133133

134134
if (this.runDebugAdapter)
135135
{

src/PowerShellEditorServices/Session/EditorSession.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class EditorSession
2525
/// <summary>
2626
/// Gets the PowerShellContext instance for this session.
2727
/// </summary>
28-
public PowerShellContext powerShellContext { get; private set; }
28+
public PowerShellContext PowerShellContext { get; private set; }
2929

3030
/// <summary>
3131
/// Gets the LanguageService instance for this session.
@@ -60,10 +60,10 @@ public void StartSession(IConsoleHost consoleHost)
6060
this.Workspace = new Workspace();
6161

6262
// Initialize all services
63-
this.powerShellContext = new PowerShellContext();
64-
this.LanguageService = new LanguageService(this.powerShellContext);
63+
this.PowerShellContext = new PowerShellContext();
64+
this.LanguageService = new LanguageService(this.PowerShellContext);
6565
this.AnalysisService = new AnalysisService();
66-
this.DebugService = new DebugService(this.powerShellContext);
66+
this.DebugService = new DebugService(this.PowerShellContext);
6767
}
6868

6969
#endregion
@@ -82,10 +82,10 @@ public void Dispose()
8282
this.AnalysisService = null;
8383
}
8484

85-
if (this.powerShellContext != null)
85+
if (this.PowerShellContext != null)
8686
{
87-
this.powerShellContext.Dispose();
88-
this.powerShellContext = null;
87+
this.PowerShellContext.Dispose();
88+
this.PowerShellContext = null;
8989
}
9090
}
9191

0 commit comments

Comments
 (0)