Commit Graph
7 Commits
Author SHA1 Message Date
Stephen Toub 7b5e7af912 Move Environment and friends to corefx
Currently System.Runtime.Extensions type forwards to the Environment in the runtime, which means we need to implement functionality in both coreclr and corert.  It's also missing functionality, which means to add that functionality back we'd need to do so in both runtimes, and we'd miss out on sharing code with elsewhere in corefx.

This commit:
1) Adds Environment, EnvironmentVariableTarget, OperatingSystem, and PlatformID to corefx so that System.Runtime.Extensions contains the type rather than forwarding to it.
2) Adds implementations of all of the missing members: CommandLine, CurrentDirectory, ExitCode, Is64BitProcess, Is64BitOperatingSystem, OSVersion, SystemPageSize, UserInteractive, UserName, UserDomainName, Version, WorkingSet, GetLogicalDrives, GetFolderPath, and the overloads of Get/SetEnvironmentVariable(s) that take an EnvironmentVariableTarget.
3) Adds the additional members to the contract.
4) Adds some basic tests to ensure basic functionality works.

Work that still needs to be done after this:
1) Add an EnvironmentAugments type to System.Private.Corelib in both corefx and corert, use that to replace the reflection-based hack in this commit, then remove the current Environment from Corelib's model.xml so that the rewriter will make it internal.  As part of this, we need to determine how to handle "IsAppXmodel/DesignMode" from corefx, whether we need two different builds for Win32/WinRT, etc.
2) Fix Get/SetEnvironmentVariable(s) to not ignore the EnvironmentVariableTarget.  This should be doable once (1) is done.
3) Add more support to the Unix implementation of GetFolderPath for more special folders
4) Add a GetTickCount method to the System.Native native lib, ala the implementation in libcoreclr; the current implementation is functional but slower than it could be.
5) Implement more Windows functionality if/when missing functions become available: SHGetFolderPath and GetVersionExW.
6) Use GetLogicalProcessInformationEx in ProcessorCount (or delegate to the implementation in coreclr).
I will open issues for each of these prior to merging this commit.


Commit migrated from https://github.com/dotnet/corefx/commit/fe5f4fbebc9e85c8e512a273567719dca15ac764
2016-07-05 14:09:16 -04:00
stephentoub 685d9f5063 Add API review headers to ref files
Commit migrated from https://github.com/dotnet/corefx/commit/5240b324e50f9aabaa11d4b0c46acc34e370a724
2016-02-11 10:50:44 -05:00
dotnet-bot 39d1eab950 Update licensing headers
Commit migrated from https://github.com/dotnet/corefx/commit/7cad8486cbabbce0236bdf530e30db7036335524
2016-01-27 08:02:28 -08:00
Lakshmi Priya Sekar 328a09c653 Add Environment.MachineName to .NET Core.
Commit migrated from https://github.com/dotnet/corefx/commit/3d92738669b44bd8be981c3fc700efbbc0cd4f1c
2016-01-24 17:19:38 -08:00
Pallavi Taneja 8ee2d1e233 Expose Environment.GetCommandLineArgs
Commit migrated from https://github.com/dotnet/corefx/commit/4752cbb364767e8dc3a5cb299207393a8ddb704a
2015-11-10 13:42:45 -08:00
Pallavi Taneja b23b63920b Expose Enviornment.Exit
Commit migrated from https://github.com/dotnet/corefx/commit/40b46199dafa957a95323e415a62a4469f82c7a4
2015-10-30 14:08:39 -07:00
Eric St. John 77309d4821 Update the version of all assemblies
This change updates the assembly versions of all of the corefx assemblies
as needed after we shipped stable versions.  Assemblies with API differences
get a minor version bump.  Assemblies with only bugfixes get a build version
bump.

In order to facilitate this I had to update the reference assemblies, so I took
the opportunity to port them all to the open.

[tfs-changeset: 1514419]


Commit migrated from https://github.com/dotnet/corefx/commit/40723b795917f2e98b64d45c17effb2546dd0cae
2015-08-13 17:07:57 -07:00