From: Adam Sitnik Date: Fri, 18 Sep 2020 03:46:30 +0000 (+0200) Subject: Annotate Min and Max WorkingSet setters as supported on macOS and FreeBSD (#42385) X-Git-Tag: submit/tizen/20210909.063632~5437 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9299efc1ec38b8b23fcee944752b4bb32d3de0e9;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Annotate Min and Max WorkingSet setters as supported on macOS and FreeBSD (#42385) * Annotate MaxWorkingSet setter as supported on macOS and FreeBSD * annotate MinWorkingSet as well, simplify the comment * update ref assembly --- diff --git a/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs b/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs index c507046..4776804 100644 --- a/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs +++ b/src/libraries/System.Diagnostics.Process/ref/System.Diagnostics.Process.cs @@ -42,8 +42,8 @@ namespace System.Diagnostics public System.Diagnostics.ProcessModule? MainModule { get { throw null; } } public System.IntPtr MainWindowHandle { get { throw null; } } public string MainWindowTitle { get { throw null; } } - public System.IntPtr MaxWorkingSet { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } } - public System.IntPtr MinWorkingSet { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } } + public System.IntPtr MaxWorkingSet { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("macos")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd")] set { } } + public System.IntPtr MinWorkingSet { get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("macos")] [System.Runtime.Versioning.SupportedOSPlatformAttribute("freebsd")] set { } } public System.Diagnostics.ProcessModuleCollection Modules { get { throw null; } } [System.ObsoleteAttribute("This property has been deprecated. Please use System.Diagnostics.Process.NonpagedSystemMemorySize64 instead. https://go.microsoft.com/fwlink/?linkid=14202")] public int NonpagedSystemMemorySize { get { throw null; } } diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs index d317a3d..5422827 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/Process.cs @@ -254,12 +254,10 @@ namespace System.Diagnostics } } - /// - /// - /// Gets or sets the maximum allowable working set for the associated - /// process. - /// - /// + /// + /// Gets or sets the maximum allowable working set for the associated process. + /// + /// On macOS and FreeBSD, setting the value works only for the current process. public IntPtr MaxWorkingSet { get @@ -268,18 +266,18 @@ namespace System.Diagnostics return _maxWorkingSet; } [SupportedOSPlatform("windows")] + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("freebsd")] set { SetWorkingSetLimits(null, value); } } - /// - /// - /// Gets or sets the minimum allowable working set for the associated - /// process. - /// - /// + /// + /// Gets or sets the minimum allowable working set for the associated process. + /// + /// On macOS and FreeBSD, setting the value works only for the current process. public IntPtr MinWorkingSet { get @@ -288,6 +286,8 @@ namespace System.Diagnostics return _minWorkingSet; } [SupportedOSPlatform("windows")] + [SupportedOSPlatform("macos")] + [SupportedOSPlatform("freebsd")] set { SetWorkingSetLimits(value, null);