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

Add EnvironmentAugments to corert#1496

Merged
jkotas merged 2 commits into
dotnet:masterfrom
stephentoub:environmentaugments
Jul 12, 2016
Merged

Add EnvironmentAugments to corert#1496
jkotas merged 2 commits into
dotnet:masterfrom
stephentoub:environmentaugments

Conversation

@stephentoub
Copy link
Copy Markdown
Member

Continuation of dotnet/corefx#9851
cc: @jkotas, @danmosemsft

@jkotas
Copy link
Copy Markdown
Member

jkotas commented Jul 9, 2016

LGTM (with the same comments as in dotnet/coreclr#6205).

public static void Exit(int exitCode) => Environment.Exit(exitCode);
public static int ExitCode { get { return 0; } set { throw new PlatformNotSupportedException(); } }
public static void FailFast(string message, Exception error) => Environment.FailFast(message, error);
public static string[] GetCommandLineArgs() => Environment.GetCommandLineArgs();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause build break when integrated to TFS. Environment.GetCommandLineArgs was not implemented for .NET Native for UWP yet - it is under CORERT ifdef. We should remove the CORERT ifdef in Environment.cs. It won't make it work, but it will be good enough to fix the build break.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed. Thanks.

And avoid null ref if GetCommandLineArgs is called without SetCommandLineArgs having been called.
@jkotas jkotas merged commit 03717d1 into dotnet:master Jul 12, 2016
@stephentoub stephentoub deleted the environmentaugments branch August 22, 2016 01:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants