From 9d228c85464de2bfe68d8d86a3794112d7bb54fb Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Sat, 14 Oct 2017 07:39:37 -0700 Subject: [PATCH] Delete EnvironmentAugments.GetEnvironmentVariables (#14500) CoreFX has been using EnumerateEnvironmentVariables for a while now. --- src/mscorlib/src/Internal/Runtime/Augments/EnvironmentAugments.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/mscorlib/src/Internal/Runtime/Augments/EnvironmentAugments.cs b/src/mscorlib/src/Internal/Runtime/Augments/EnvironmentAugments.cs index 3e485ec..541566c 100644 --- a/src/mscorlib/src/Internal/Runtime/Augments/EnvironmentAugments.cs +++ b/src/mscorlib/src/Internal/Runtime/Augments/EnvironmentAugments.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. using System; -using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Runtime.CompilerServices; @@ -22,11 +21,6 @@ namespace Internal.Runtime.Augments public static int TickCount => Environment.TickCount; public static string GetEnvironmentVariable(string variable) => Environment.GetEnvironmentVariable(variable); public static string GetEnvironmentVariable(string variable, EnvironmentVariableTarget target) => Environment.GetEnvironmentVariable(variable, target); - // TODO Perf: Once CoreCLR gets EnumerateEnvironmentVariables(), get rid of GetEnvironmentVariables() and have - // corefx call EnumerateEnvironmentVariables() instead so we don't have to create a dictionary just to copy it into - // another dictionary. - public static IDictionary GetEnvironmentVariables() => new Dictionary(EnumerateEnvironmentVariables()); - public static IDictionary GetEnvironmentVariables(EnvironmentVariableTarget target) => new Dictionary(EnumerateEnvironmentVariables(target)); public static IEnumerable> EnumerateEnvironmentVariables() => Environment.EnumerateEnvironmentVariables(); public static IEnumerable> EnumerateEnvironmentVariables(EnvironmentVariableTarget target) => Environment.EnumerateEnvironmentVariables(target); -- 2.7.4