Skip to content

Commit 15f145b

Browse files
misc comment updates
1 parent be35db0 commit 15f145b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/Azure.Functions.PowerShell.Worker/PowerShell/PowerShellExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ public static Collection<T> InvokeAndClearCommands<T>(this PowerShell pwsh)
2424
return result;
2525
}
2626
}
27-
}
27+
}

src/Azure.Functions.PowerShell.Worker/PowerShell/PowerShellManager.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using System.Collections;
88
using System.Collections.Generic;
99
using System.Collections.ObjectModel;
10-
using System.Text;
1110

1211
using Microsoft.Azure.Functions.PowerShellWorker.Utility;
1312
using Microsoft.Azure.WebJobs.Script.Grpc.Messages;
@@ -17,7 +16,6 @@
1716
namespace Microsoft.Azure.Functions.PowerShellWorker.PowerShell
1817
{
1918
using System.Management.Automation;
20-
using System.Reflection;
2119

2220
internal class PowerShellManager
2321
{
@@ -44,23 +42,25 @@ internal class PowerShellManager
4442

4543
public static PowerShellManager Create(RpcLogger logger)
4644
{
47-
// Set up initial session state: set execution policy, import helper module, and using namespace
45+
// Set up initial session state
4846
var initialSessionState = InitialSessionState.CreateDefault();
4947
if(Platform.IsWindows)
5048
{
5149
initialSessionState.ExecutionPolicy = Microsoft.PowerShell.ExecutionPolicy.Unrestricted;
5250
}
5351
var pwsh = PowerShell.Create(initialSessionState);
5452

55-
// Add HttpResponseContext namespace so users can reference
56-
// HttpResponseContext without needing to specify the full namespace
57-
// and also import the Azure Functions binding helper module
53+
// Build path to the Azure Functions binding helper module
5854
string modulePath = System.IO.Path.Join(
5955
AppDomain.CurrentDomain.BaseDirectory,
6056
"Azure.Functions.PowerShell.Worker.Module",
6157
"Azure.Functions.PowerShell.Worker.Module.psd1");
58+
59+
// Add HttpResponseContext namespace so users can reference
60+
// HttpResponseContext without needing to specify the full namespace
6261
pwsh.AddScript($"using namespace {typeof(HttpResponseContext).Namespace}")
6362
.AddStatement()
63+
// Import the Azure Functions binding helper module
6464
.AddCommand("Import-Module")
6565
.AddParameter("Name", modulePath)
6666
.AddParameter("Scope", "Global")
@@ -83,7 +83,6 @@ public Hashtable InvokeFunction(
8383
// If it does, we invoke the command of that name. We also need to fetch
8484
// the ParameterMetadata so that we can tell whether or not the user is asking
8585
// for the $TriggerMetadata
86-
8786
using (ExecutionTimer.Start(_logger, "Parameter metadata retrieved."))
8887
{
8988
if (entryPoint != "")

0 commit comments

Comments
 (0)