Make GetProcessInfo() for a single PID cheaper on Windows (dotnet/corefx#24198)
* Improved performance of local process information retrieval by not constructing all ProcessInfo instances for all running processes anymore if only one is of interest.
* Removed superfluous space characters only
* Remove superfluous default parameter value
* Added a Debug.Assert()
* Moved a variable from the .Win32 file into the .Windows file in order to fix the UAP build and improved a Debug.Assert() message
* Attempt to make the UAP build happy again
* Removed the optionality of the "int processId" parameter from NtProcessInfoHelper.GetProcessInfos() to try and make the UAP build happy.
* Revert "Removed the optionality of the "int processId" parameter from NtProcessInfoHelper.GetProcessInfos() to try and make the UAP build happy."
This reverts commit dotnet/corefx@
78ef4706f412d00d8396a073bd73f9fbd87a5696.
* Revert "Attempt to make the UAP build happy again"
This reverts commit dotnet/corefx@
9ca6a02f2d2886ed9acc7e9643307e0ba0ca94b8.
* Fixed UAP builds by creating an NtProcessInfoHelper type with a contained GetProcessInfos(int processId = AllProcessIds) method in the ProcessManager.Uap.cs file which will just throw a NotSupportedException
* Aligned the implementations of GetProcessInfos(string machineName) for both Uap and Win32 into a shared Windows method (possible now because of previous check-in)
* Switched to a Predicate<T> based implementation instead of the "AllProcessIds = -1" magic number based version
Commit migrated from https://github.com/dotnet/corefx/commit/
ebf11343ff80295d49607eef5114df917e45f9bb