This repository was archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Enable building all of corefx with an "unknown" Unix #4402
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletions
80
src/System.Diagnostics.Process/src/System/Diagnostics/Process.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Diagnostics | ||
| { | ||
| public partial class Process : IDisposable | ||
| { | ||
| /// <summary> | ||
| /// Creates an array of <see cref="Process"/> components that are associated with process resources on a | ||
| /// remote computer. These process resources share the specified process name. | ||
| /// </summary> | ||
| public static Process[] GetProcessesByName(string processName, string machineName) | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| /// <summary>Gets the amount of time the process has spent running code inside the operating system core.</summary> | ||
| public TimeSpan PrivilegedProcessorTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary>Gets the time the associated process was started.</summary> | ||
| public DateTime StartTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets the amount of time the associated process has spent utilizing the CPU. | ||
| /// It is the sum of the <see cref='System.Diagnostics.Process.UserProcessorTime'/> and | ||
| /// <see cref='System.Diagnostics.Process.PrivilegedProcessorTime'/>. | ||
| /// </summary> | ||
| public TimeSpan TotalProcessorTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets the amount of time the associated process has spent running code | ||
| /// inside the application portion of the process (not the operating system core). | ||
| /// </summary> | ||
| public TimeSpan UserProcessorTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets which processors the threads in this process can be scheduled to run on. | ||
| /// </summary> | ||
| private unsafe IntPtr ProcessorAffinityCore | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| set { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Make sure we have obtained the min and max working set limits. | ||
| /// </summary> | ||
| private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet) | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| /// <summary>Sets one or both of the minimum and maximum working set limits.</summary> | ||
| /// <param name="newMin">The new minimum working set limit, or null not to change it.</param> | ||
| /// <param name="newMax">The new maximum working set limit, or null not to change it.</param> | ||
| /// <param name="resultingMin">The resulting minimum working set limit after any changes applied.</param> | ||
| /// <param name="resultingMax">The resulting maximum working set limit after any changes applied.</param> | ||
| private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax) | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| private static string GetExePath() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
| } | ||
| } |
35 changes: 35 additions & 0 deletions
35
src/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Diagnostics | ||
| { | ||
| internal static partial class ProcessManager | ||
| { | ||
| /// <summary>Gets the IDs of all processes on the current machine.</summary> | ||
| public static int[] GetProcessIds() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| /// <summary>Gets process infos for each process on the specified machine.</summary> | ||
| /// <param name="machineName">The target machine.</param> | ||
| /// <returns>An array of process infos, one per found process.</returns> | ||
| public static ProcessInfo[] GetProcessInfos(string machineName) | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| /// <summary>Gets an array of module infos for the specified process.</summary> | ||
| /// <param name="processId">The ID of the process whose modules should be enumerated.</param> | ||
| /// <returns>The array of modules.</returns> | ||
| internal static ModuleInfo[] GetModuleInfos(int processId) | ||
| { | ||
| return Array.Empty<ModuleInfo>(); | ||
| } | ||
|
|
||
| private static ProcessInfo CreateProcessInfo(int pid) | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
| } | ||
| } |
53 changes: 53 additions & 0 deletions
53
src/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Diagnostics | ||
| { | ||
| public partial class ProcessThread | ||
| { | ||
| /// <summary> | ||
| /// Returns or sets the priority level of the associated thread. The priority level is | ||
| /// not an absolute level, but instead contributes to the actual thread priority by | ||
| /// considering the priority class of the process. | ||
| /// </summary> | ||
| private ThreadPriorityLevel PriorityLevelCore | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| set { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Returns the amount of time the thread has spent running code inside the operating | ||
| /// system core. | ||
| /// </summary> | ||
| public TimeSpan PrivilegedProcessorTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary>Returns the time the associated thread was started.</summary> | ||
| public DateTime StartTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Returns the amount of time the associated thread has spent utilizing the CPU. | ||
| /// It is the sum of the System.Diagnostics.ProcessThread.UserProcessorTime and | ||
| /// System.Diagnostics.ProcessThread.PrivilegedProcessorTime. | ||
| /// </summary> | ||
| public TimeSpan TotalProcessorTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Returns the amount of time the associated thread has spent running code | ||
| /// inside the application (not the operating system core). | ||
| /// </summary> | ||
| public TimeSpan UserProcessorTime | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/System.IO.FileSystem.Watcher/src/System/IO/FileSystemWatcher.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.IO | ||
| { | ||
| public partial class FileSystemWatcher | ||
| { | ||
| /// <summary>Called when FileSystemWatcher is finalized.</summary> | ||
| private void FinalizeDispose() | ||
| { | ||
| } | ||
|
|
||
| private void StartRaisingEvents() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| private void StopRaisingEvents() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...NetworkInformation/src/System/Net/NetworkInformation/IPGlobalPropertiesPal.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Net.NetworkInformation | ||
| { | ||
| internal static class IPGlobalPropertiesPal | ||
| { | ||
| public static IPGlobalProperties GetIPGlobalProperties() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
| } | ||
| } |
14 changes: 14 additions & 0 deletions
14
....NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Net.NetworkInformation | ||
| { | ||
| public class NetworkChange | ||
| { | ||
| public static event NetworkAddressChangedEventHandler NetworkAddressChanged | ||
| { | ||
| add { throw new PlatformNotSupportedException(); } | ||
| remove { throw new PlatformNotSupportedException(); } | ||
| } | ||
| } | ||
| } |
29 changes: 29 additions & 0 deletions
29
...t.NetworkInformation/src/System/Net/NetworkInformation/NetworkInterfacePal.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Net.NetworkInformation | ||
| { | ||
| internal static class NetworkInterfacePal | ||
| { | ||
| /// Returns objects that describe the network interfaces on the local computer. | ||
| public static NetworkInterface[] GetAllNetworkInterfaces() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| public static bool GetIsNetworkAvailable() | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
|
|
||
| public static int IPv6LoopbackInterfaceIndex | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
|
|
||
| public static int LoopbackInterfaceIndex | ||
| { | ||
| get { throw new PlatformNotSupportedException(); } | ||
| } | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
src/System.Runtime.InteropServices.RuntimeInformation/src/RuntimeInformation.UnknownUnix.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // Copyright (c) Microsoft. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| namespace System.Runtime.InteropServices | ||
| { | ||
| public static class RuntimeInformation | ||
| { | ||
| public static bool IsOSPlatform(OSPlatform osPlatform) | ||
| { | ||
| throw new PlatformNotSupportedException(); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for? Can you comment it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bunch of fields that aren't being used. I'll add a comment.