From bf2fdbcf9992c42b781d44aa39921e05ceaa8b1e Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 8 Feb 2019 20:10:38 -0800 Subject: [PATCH] Delete EnvironmentAugments (#22485) --- .../System.Private.CoreLib.csproj | 1 - .../Runtime/Augments/EnvironmentAugments.cs | 48 ---------------------- 2 files changed, 49 deletions(-) delete mode 100644 src/System.Private.CoreLib/src/Internal/Runtime/Augments/EnvironmentAugments.cs diff --git a/src/System.Private.CoreLib/System.Private.CoreLib.csproj b/src/System.Private.CoreLib/System.Private.CoreLib.csproj index 777f1f0..2040885 100644 --- a/src/System.Private.CoreLib/System.Private.CoreLib.csproj +++ b/src/System.Private.CoreLib/System.Private.CoreLib.csproj @@ -116,7 +116,6 @@ - diff --git a/src/System.Private.CoreLib/src/Internal/Runtime/Augments/EnvironmentAugments.cs b/src/System.Private.CoreLib/src/Internal/Runtime/Augments/EnvironmentAugments.cs deleted file mode 100644 index a501f87..0000000 --- a/src/System.Private.CoreLib/src/Internal/Runtime/Augments/EnvironmentAugments.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Internal.Runtime.Augments -{ - // TODO: Delete this file once corefx has consumed https://github.com/dotnet/coreclr/pull/22106 - // and its corresponding mirrored build from corert, and then the resulting corefx builds - // have been consumed back here, such that the CI tests which currently expect to find - // EnvironmentAugments have been updated to no longer need it. - - public static class EnvironmentAugments - { - public static int CurrentManagedThreadId => Environment.CurrentManagedThreadId; - public static void Exit(int exitCode) => Environment.Exit(exitCode); - public static int ExitCode { get { return Environment.ExitCode; } set { Environment.ExitCode = value; } } - public static void FailFast(string message, Exception error) => Environment.FailFast(message, error); - public static string[] GetCommandLineArgs() => Environment.GetCommandLineArgs(); - public static bool HasShutdownStarted => Environment.HasShutdownStarted; - 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); - public static IEnumerable> EnumerateEnvironmentVariables() - { - IDictionaryEnumerator de = Environment.GetEnvironmentVariables().GetEnumerator(); - while (de.MoveNext()) - { - yield return new KeyValuePair((string)de.Key, (string)de.Value); - } - } - public static IEnumerable> EnumerateEnvironmentVariables(EnvironmentVariableTarget target) - { - IDictionaryEnumerator de = Environment.GetEnvironmentVariables(target).GetEnumerator(); - while (de.MoveNext()) - { - yield return new KeyValuePair((string)de.Key, (string)de.Value); - } - } - public static int ProcessorCount => Environment.ProcessorCount; - public static void SetEnvironmentVariable(string variable, string value) => Environment.SetEnvironmentVariable(variable, value); - public static void SetEnvironmentVariable(string variable, string value, EnvironmentVariableTarget target) => Environment.SetEnvironmentVariable(variable, value, target); - public static string StackTrace => Environment.StackTrace; // this will temporarily result in an extra frame in Environment.StackTrace calls - } -} -- 2.7.4