-
Notifications
You must be signed in to change notification settings - Fork 5k
Use separate partials for iOS&tvOS instead of UnknowUnix in System.Diagnostics.Process #61871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MaximLipnin
merged 4 commits into
dotnet:main
from
MaximLipnin:use_separate_partials_for_ios_in_SDP
Nov 24, 2021
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
a31ea47
Use separate partials for iOS&tvOS instead of UnknowUnix in System.Di…
MaximLipnin b8970c6
clean up
MaximLipnin 8bad5ea
Annotate StartTime/StartTimeCore
MaximLipnin 8dcadfe
Merge branch 'main' into use_separate_partials_for_ios_in_SDP
MaximLipnin 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
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
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
39 changes: 39 additions & 0 deletions
39
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessManager.iOS.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,39 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.Versioning; | ||
|
||
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> | ||
[UnsupportedOSPlatform("ios")] | ||
[UnsupportedOSPlatform("tvos")] | ||
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 ProcessModuleCollection GetModules(int processId) | ||
{ | ||
return new ProcessModuleCollection(0); | ||
} | ||
|
||
private static ProcessInfo CreateProcessInfo(int pid) | ||
{ | ||
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
56 changes: 56 additions & 0 deletions
56
src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.iOS.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,56 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.Versioning; | ||
|
||
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> | ||
[UnsupportedOSPlatform("ios")] | ||
[UnsupportedOSPlatform("tvos")] | ||
public TimeSpan PrivilegedProcessorTime | ||
{ | ||
get { throw new PlatformNotSupportedException(); } | ||
} | ||
|
||
private DateTime GetStartTime() => 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> | ||
[UnsupportedOSPlatform("ios")] | ||
[UnsupportedOSPlatform("tvos")] | ||
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> | ||
[UnsupportedOSPlatform("ios")] | ||
[UnsupportedOSPlatform("tvos")] | ||
public TimeSpan UserProcessorTime | ||
{ | ||
get { throw new PlatformNotSupportedException(); } | ||
} | ||
} | ||
} |
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.
Uh oh!
There was an error while loading. Please reload this page.