Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
Add stubbed out implementations of env. variables methods (#2405)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas committed Dec 23, 2016
1 parent d7c997a commit 424c07a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.

using System;
using System.Collections;
using System.Runtime;
using System.Runtime.CompilerServices;

Expand Down Expand Up @@ -90,5 +91,12 @@ public static string StackTrace
}

public static int TickCount => Environment.TickCount;

public static string GetEnvironmentVariable(string variable) => Environment.GetEnvironmentVariable(variable);
public static string GetEnvironmentVariable(string variable, EnvironmentVariableTarget target) { throw new NotImplementedException(); }
public static IDictionary GetEnvironmentVariables() { throw new NotImplementedException(); }
public static IDictionary GetEnvironmentVariables(EnvironmentVariableTarget target) { throw new NotImplementedException(); }
public static void SetEnvironmentVariable(string variable, string value) { throw new NotImplementedException(); }
public static void SetEnvironmentVariable(string variable, string value, EnvironmentVariableTarget target) { throw new NotImplementedException(); }
}
}
7 changes: 7 additions & 0 deletions src/System.Private.CoreLib/src/System/Environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@

namespace System
{
public enum EnvironmentVariableTarget
{
Process = 0,
User = 1,
Machine = 2,
}

// Environment is marked as Eager to allow Lock to read the current
// thread ID, since Lock is used in ClassConstructorRunner.Cctor.GetCctor
[EagerOrderedStaticConstructor(EagerStaticConstructorOrder.SystemEnvironment)]
Expand Down

0 comments on commit 424c07a

Please sign in to comment.