Skip to content

Commit 4a975b0

Browse files
committed
Remove unused CommandDumpEnvironmentVariables from (managed) TestChild
1 parent b2e303c commit 4a975b0

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/TestChild/TestChildProgram.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ public static int Main(string[] args)
2424
var command = args[0];
2525
switch (command)
2626
{
27-
case "DumpEnvironmentVariables":
28-
return CommandDumpEnvironmentVariables();
2927
case "EchoAndSleepAndEcho":
3028
return CommandEchoAndSleepAndEcho(args);
3129
case "EchoBack":
@@ -50,20 +48,6 @@ public static int Main(string[] args)
5048
}
5149
}
5250

53-
private static int CommandDumpEnvironmentVariables()
54-
{
55-
// Output in UTF-8 so that the output will not be affected by the current code page.
56-
using var sw = new StreamWriter(Console.OpenStandardOutput(), Encoding.UTF8);
57-
58-
var envVars = Environment.GetEnvironmentVariables();
59-
foreach (var key in envVars.Keys.Cast<string>().OrderBy(x => x, StringComparer.Ordinal))
60-
{
61-
sw.Write("{0}={1}\0", key, (string?)envVars[key]);
62-
}
63-
64-
return 0;
65-
}
66-
6751
private static int CommandEchoAndSleepAndEcho(string[] args)
6852
{
6953
Console.Out.Write(args[1]);

0 commit comments

Comments
 (0)