Skip to content

Commit 835f7c9

Browse files
authored
Annotate System.Diagnostics.Process.MaxWorkingSet/MinWorkingSet props as unsupported on iOS/tvOS (#52395)
1 parent dcb42e8 commit 835f7c9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public Process() { }
4343
public System.Diagnostics.ProcessModule? MainModule { get { throw null; } }
4444
public System.IntPtr MainWindowHandle { get { throw null; } }
4545
public string MainWindowTitle { get { throw null; } }
46-
public System.IntPtr MaxWorkingSet { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("macos")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd")] set { } }
47-
public System.IntPtr MinWorkingSet { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("macos")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd")] set { } }
46+
public System.IntPtr MaxWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios"), System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd"), System.Runtime.Versioning.SupportedOSPlatformAttribute("macos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
47+
public System.IntPtr MinWorkingSet { [System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios"), System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd"), System.Runtime.Versioning.SupportedOSPlatformAttribute("macos"), System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
4848
public System.Diagnostics.ProcessModuleCollection Modules { get { throw null; } }
4949
[System.ObsoleteAttribute("This property has been deprecated because the type of the property can't represent all valid results. Please use System.Diagnostics.Process.NonpagedSystemMemorySize64 instead. https://go.microsoft.com/fwlink/?linkid=14202")]
5050
public int NonpagedSystemMemorySize { get { throw null; } }

src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs

+4
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ public string MachineName
260260
/// <remarks>On macOS and FreeBSD, setting the value works only for the current process.</remarks>
261261
public IntPtr MaxWorkingSet
262262
{
263+
[UnsupportedOSPlatform("ios")]
264+
[UnsupportedOSPlatform("tvos")]
263265
get
264266
{
265267
EnsureWorkingSetLimits();
@@ -280,6 +282,8 @@ public IntPtr MaxWorkingSet
280282
/// <remarks>On macOS and FreeBSD, setting the value works only for the current process.</remarks>
281283
public IntPtr MinWorkingSet
282284
{
285+
[UnsupportedOSPlatform("ios")]
286+
[UnsupportedOSPlatform("tvos")]
283287
get
284288
{
285289
EnsureWorkingSetLimits();

0 commit comments

Comments
 (0)