Skip to content

Commit 42f89f5

Browse files
jeffhandleyadamsitnikViktorHofer
authored
mark Windows-specific APIs as such (#39265) (#39657)
* move all OSPlatformAttributes to a single file so they can be easily referenced in < .NET 5 libraries * Adds System.Runtime.Versioning*Platform* annotation attributes to < .NET 5 builds * introduce MinimiumSupportedWindowsPlatform * introduce IsWindowsSpecific setting that adds MinimumOSPlatform attribute for Windows Specific libraries * mark all Windows-specific libraries as such * annotate Windows-specific System.Console methods and properites * annotate Windows-specific DpapiProtectedConfigurationProvider type * annotate throwing Windows-specific APIs from System.Diagnostics.Process namespace * annotate throwing Windows-specific APIs from System.IO.MemoryMappedFiles namespace * annotate Windows-specific APIs from System.IO.Pipes namespace * the new attributes should support enums * annotate Windows-specific APIs from HttpListenerTimeoutManager class * annotate Windows-specific APIs from System.Net.Sockets namespace * annotate Windows-specific APIs from System.Runtime.InteropServices namespace * annotate Windows-specific APIs from System.Security.Cryptography.Csp namespace * annotate Windows-specific APIs from System.Security.Cryptography.X509Certificates namespace * annotate Windows-specific APIs from System.Threading namespace * address code review feedback: dont introduce new constants, reuse existing SYSTEM_PRIVATE_CORELIB * code review: import the namespace, simplify the attribute name * add missing Socket.DuplicateAndClose and Socket(SocketInformation) * fix the test name (it does not throw) * add missing DriveInfo.set_VolumeLabel * add System.IO.FileSystem File Encrypt and Descrypt methods * simplify the < .NET 5 check * enable nullable in explicit way as it's not enabled in all the projects where this file is included * include platform attributes in projects that ask for it in explicit way * set IncludePlatformAttributes to true for projects that include files from other projects * use suggestions from Viktor and Santi Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com> Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com> Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
1 parent 9a0b34d commit 42f89f5

File tree

101 files changed

+561
-197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+561
-197
lines changed

eng/Configurations.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<NetCoreAppCurrentBrandName>.NET $(NetCoreAppCurrentVersion)</NetCoreAppCurrentBrandName>
3232

3333
<NetFrameworkCurrent>net472</NetFrameworkCurrent>
34+
<MinimiumSupportedWindowsPlatform>WINDOWS7.0</MinimiumSupportedWindowsPlatform>
3435
</PropertyGroup>
3536

3637
<!-- Honor the generic RuntimeConfiguration property. -->

eng/versioning.targets

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@
2222
</AssemblyMetadata>
2323
</ItemGroup>
2424

25+
<!-- Adds MinimumOSPlatform attribute for Windows Specific libraries -->
26+
<ItemGroup Condition="'$(IsWindowsSpecific)' == 'true' and '$(IsTestProject)' != 'true'">
27+
<AssemblyAttribute Include="System.Runtime.Versioning.MinimumOSPlatform">
28+
<_Parameter1>$(MinimiumSupportedWindowsPlatform)</_Parameter1>
29+
</AssemblyAttribute>
30+
</ItemGroup>
31+
2532
<Target Name="DecideIfWeNeedToIncludeDllSafeSearchPathAttribute"
2633
Condition="'$(IsDotNetFrameworkProductAssembly)' == 'true' and '$(IsTestProject)' != 'true' and '$(IsTestSupportProject)' != 'true'">
2734

src/libraries/Directory.Build.targets

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,6 @@
226226
<!-- Adds Nullable annotation attributes to netstandard <= 2.0 builds -->
227227
<Choose>
228228
<When Condition="'$(Nullable)' != '' and ($(TargetFramework.StartsWith('netstandard1')) or '$(TargetFramework)' == 'netstandard2.0' or $(TargetFramework.StartsWith('netcoreapp2')) or '$(TargetFrameworkIdentifier)' == '.NETFramework')">
229-
<PropertyGroup>
230-
<DefineConstants>$(DefineConstants),INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
231-
</PropertyGroup>
232229
<ItemGroup>
233230
<Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\NullableAttributes.cs" Link="System\Diagnostics\CodeAnalysis\NullableAttributes.cs" />
234231
</ItemGroup>
@@ -240,6 +237,15 @@
240237
<ExcludeFromPackage Condition="'$(TargetFramework)' == '$(NetFrameworkCurrent)' and '$(ExcludeCurrentFullFrameworkFromPackage)' == 'true'">true</ExcludeFromPackage>
241238
</PropertyGroup>
242239

240+
<!-- Adds System.Runtime.Versioning*Platform* annotation attributes to < .NET 5 builds -->
241+
<Choose>
242+
<When Condition="('$(IncludePlatformAttributes)' == 'true' or '$(IsWindowsSpecific)' == 'true') and ('$(TargetFrameworkIdentifier)' != '.NETCoreApp' or $([MSBuild]::VersionLessThan($(TargetFrameworkVersion), '5.0')))">
243+
<ItemGroup>
244+
<Compile Include="$(CoreLibSharedDir)System\Runtime\Versioning\PlatformAttributes.cs" Link="System\Runtime\Versioning\PlatformAttributes.cs" />
245+
</ItemGroup>
246+
</When>
247+
</Choose>
248+
243249
<!-- The Default behavior in VS is to show files for the first target framework in TargetFrameworks property.
244250
This is required to show all the files corresponding to all target frameworks in VS. -->
245251
<ItemGroup>

src/libraries/Microsoft.IO.Redist/src/Microsoft.IO.Redist.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
77
<ClsCompliant>false</ClsCompliant>
88
<Nullable>annotations</Nullable>
9+
<IncludePlatformAttributes>true</IncludePlatformAttributes>
910
</PropertyGroup>
1011
<ItemGroup>
1112
<Compile Include="..\..\System.IO.FileSystem\src\System\IO\Directory.cs"

src/libraries/Microsoft.Win32.Registry.AccessControl/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Microsoft</StrongNameKeyId>
5+
<IsWindowsSpecific>true</IsWindowsSpecific>
56
</PropertyGroup>
67
</Project>

src/libraries/Microsoft.Win32.Registry/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
<StrongNameKeyId>Microsoft</StrongNameKeyId>
55
<IsNETCoreApp>true</IsNETCoreApp>
66
<IsNETCoreAppRef>false</IsNETCoreAppRef>
7+
<IsWindowsSpecific>true</IsWindowsSpecific>
78
</PropertyGroup>
89
</Project>

src/libraries/Microsoft.Win32.SystemEvents/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Open</StrongNameKeyId>
5+
<IsWindowsSpecific>true</IsWindowsSpecific>
56
</PropertyGroup>
67
</Project>

src/libraries/System.Configuration.ConfigurationManager/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Open</StrongNameKeyId>
5+
<IncludePlatformAttributes>true</IncludePlatformAttributes>
56
</PropertyGroup>
67
</Project>

src/libraries/System.Configuration.ConfigurationManager/ref/System.Configuration.ConfigurationManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,7 @@ public DictionarySectionHandler() { }
607607
protected virtual string ValueAttributeName { get { throw null; } }
608608
public virtual object Create(object parent, object context, System.Xml.XmlNode section) { throw null; }
609609
}
610+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
610611
public sealed partial class DpapiProtectedConfigurationProvider : System.Configuration.ProtectedConfigurationProvider
611612
{
612613
public DpapiProtectedConfigurationProvider() { }

src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/DpapiProtectedConfigurationProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
using System.Security.Cryptography;
66
using System.Text;
77
using System.Xml;
8+
using System.Runtime.Versioning;
89

910
namespace System.Configuration
1011
{
12+
[MinimumOSPlatform("windows7.0")]
1113
public sealed class DpapiProtectedConfigurationProvider : ProtectedConfigurationProvider
1214
{
1315
private bool _useMachineProtection = true;

src/libraries/System.Console/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<PropertyGroup>
44
<StrongNameKeyId>Microsoft</StrongNameKeyId>
55
<IsNETCoreApp>true</IsNETCoreApp>
6+
<IncludePlatformAttributes>true</IncludePlatformAttributes>
67
</PropertyGroup>
78
</Project>

src/libraries/System.Console/ref/System.Console.cs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ namespace System
99
public static partial class Console
1010
{
1111
public static System.ConsoleColor BackgroundColor { get { throw null; } set { } }
12-
public static int BufferHeight { get { throw null; } set { } }
13-
public static int BufferWidth { get { throw null; } set { } }
12+
public static int BufferHeight { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
13+
public static int BufferWidth { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
14+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
1415
public static bool CapsLock { get { throw null; } }
1516
public static int CursorLeft { get { throw null; } set { } }
16-
public static int CursorSize { get { throw null; } set { } }
17+
public static int CursorSize { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
1718
public static int CursorTop { get { throw null; } set { } }
18-
public static bool CursorVisible { get { throw null; } set { } }
19+
public static bool CursorVisible { [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] get { throw null; } set { } }
1920
public static System.IO.TextWriter Error { get { throw null; } }
2021
public static System.ConsoleColor ForegroundColor { get { throw null; } set { } }
21-
public static (int Left, int Top) GetCursorPosition() { throw null; }
2222
public static System.IO.TextReader In { get { throw null; } }
2323
public static System.Text.Encoding InputEncoding { get { throw null; } set { } }
2424
public static bool IsErrorRedirected { get { throw null; } }
@@ -27,20 +27,25 @@ public static partial class Console
2727
public static bool KeyAvailable { get { throw null; } }
2828
public static int LargestWindowHeight { get { throw null; } }
2929
public static int LargestWindowWidth { get { throw null; } }
30+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
3031
public static bool NumberLock { get { throw null; } }
3132
public static System.IO.TextWriter Out { get { throw null; } }
3233
public static System.Text.Encoding OutputEncoding { get { throw null; } set { } }
33-
public static string Title { get { throw null; } set { } }
34+
public static string Title { [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] get { throw null; } set { } }
3435
public static bool TreatControlCAsInput { get { throw null; } set { } }
35-
public static int WindowHeight { get { throw null; } set { } }
36-
public static int WindowLeft { get { throw null; } set { } }
37-
public static int WindowTop { get { throw null; } set { } }
38-
public static int WindowWidth { get { throw null; } set { } }
36+
public static int WindowHeight { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
37+
public static int WindowLeft { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
38+
public static int WindowTop { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
39+
public static int WindowWidth { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
3940
public static event System.ConsoleCancelEventHandler? CancelKeyPress { add { } remove { } }
4041
public static void Beep() { }
42+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
4143
public static void Beep(int frequency, int duration) { }
4244
public static void Clear() { }
45+
public static (int Left, int Top) GetCursorPosition() { throw null; }
46+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
4347
public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop) { }
48+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
4449
public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, System.ConsoleColor sourceForeColor, System.ConsoleColor sourceBackColor) { }
4550
public static System.IO.Stream OpenStandardError() { throw null; }
4651
public static System.IO.Stream OpenStandardError(int bufferSize) { throw null; }
@@ -53,12 +58,15 @@ public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth
5358
public static System.ConsoleKeyInfo ReadKey(bool intercept) { throw null; }
5459
public static string? ReadLine() { throw null; }
5560
public static void ResetColor() { }
61+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
5662
public static void SetBufferSize(int width, int height) { }
5763
public static void SetCursorPosition(int left, int top) { }
5864
public static void SetError(System.IO.TextWriter newError) { }
5965
public static void SetIn(System.IO.TextReader newIn) { }
6066
public static void SetOut(System.IO.TextWriter newOut) { }
67+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
6168
public static void SetWindowPosition(int left, int top) { }
69+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
6270
public static void SetWindowSize(int width, int height) { }
6371
public static void Write(bool value) { }
6472
public static void Write(char value) { }

src/libraries/System.Console/src/System/Console.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Diagnostics;
5-
using System.Diagnostics.CodeAnalysis;
65
using System.IO;
76
using System.Runtime.CompilerServices;
7+
using System.Runtime.Versioning;
88
using System.Text;
99
using System.Threading;
1010

@@ -277,14 +277,17 @@ static StrongBox<bool> EnsureInitialized()
277277
public static int CursorSize
278278
{
279279
get { return ConsolePal.CursorSize; }
280+
[MinimumOSPlatform("windows7.0")]
280281
set { ConsolePal.CursorSize = value; }
281282
}
282283

284+
[MinimumOSPlatform("windows7.0")]
283285
public static bool NumberLock
284286
{
285287
get { return ConsolePal.NumberLock; }
286288
}
287289

290+
[MinimumOSPlatform("windows7.0")]
288291
public static bool CapsLock
289292
{
290293
get { return ConsolePal.CapsLock; }
@@ -312,15 +315,18 @@ public static void ResetColor()
312315
public static int BufferWidth
313316
{
314317
get { return ConsolePal.BufferWidth; }
318+
[MinimumOSPlatform("windows7.0")]
315319
set { ConsolePal.BufferWidth = value; }
316320
}
317321

318322
public static int BufferHeight
319323
{
320324
get { return ConsolePal.BufferHeight; }
325+
[MinimumOSPlatform("windows7.0")]
321326
set { ConsolePal.BufferHeight = value; }
322327
}
323328

329+
[MinimumOSPlatform("windows7.0")]
324330
public static void SetBufferSize(int width, int height)
325331
{
326332
ConsolePal.SetBufferSize(width, height);
@@ -329,32 +335,38 @@ public static void SetBufferSize(int width, int height)
329335
public static int WindowLeft
330336
{
331337
get { return ConsolePal.WindowLeft; }
338+
[MinimumOSPlatform("windows7.0")]
332339
set { ConsolePal.WindowLeft = value; }
333340
}
334341

335342
public static int WindowTop
336343
{
337344
get { return ConsolePal.WindowTop; }
345+
[MinimumOSPlatform("windows7.0")]
338346
set { ConsolePal.WindowTop = value; }
339347
}
340348

341349
public static int WindowWidth
342350
{
343351
get { return ConsolePal.WindowWidth; }
352+
[MinimumOSPlatform("windows7.0")]
344353
set { ConsolePal.WindowWidth = value; }
345354
}
346355

347356
public static int WindowHeight
348357
{
349358
get { return ConsolePal.WindowHeight; }
359+
[MinimumOSPlatform("windows7.0")]
350360
set { ConsolePal.WindowHeight = value; }
351361
}
352362

363+
[MinimumOSPlatform("windows7.0")]
353364
public static void SetWindowPosition(int left, int top)
354365
{
355366
ConsolePal.SetWindowPosition(left, top);
356367
}
357368

369+
[MinimumOSPlatform("windows7.0")]
358370
public static void SetWindowSize(int width, int height)
359371
{
360372
ConsolePal.SetWindowSize(width, height);
@@ -372,6 +384,7 @@ public static int LargestWindowHeight
372384

373385
public static bool CursorVisible
374386
{
387+
[MinimumOSPlatform("windows7.0")]
375388
get { return ConsolePal.CursorVisible; }
376389
set { ConsolePal.CursorVisible = value; }
377390
}
@@ -400,6 +413,7 @@ public static (int Left, int Top) GetCursorPosition()
400413

401414
public static string Title
402415
{
416+
[MinimumOSPlatform("windows7.0")]
403417
get { return ConsolePal.Title; }
404418
set
405419
{
@@ -412,16 +426,19 @@ public static void Beep()
412426
ConsolePal.Beep();
413427
}
414428

429+
[MinimumOSPlatform("windows7.0")]
415430
public static void Beep(int frequency, int duration)
416431
{
417432
ConsolePal.Beep(frequency, duration);
418433
}
419434

435+
[MinimumOSPlatform("windows7.0")]
420436
public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop)
421437
{
422438
ConsolePal.MoveBufferArea(sourceLeft, sourceTop, sourceWidth, sourceHeight, targetLeft, targetTop, ' ', ConsoleColor.Black, BackgroundColor);
423439
}
424440

441+
[MinimumOSPlatform("windows7.0")]
425442
public static void MoveBufferArea(int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop, char sourceChar, ConsoleColor sourceForeColor, ConsoleColor sourceBackColor)
426443
{
427444
ConsolePal.MoveBufferArea(sourceLeft, sourceTop, sourceWidth, sourceHeight, targetLeft, targetTop, sourceChar, sourceForeColor, sourceBackColor);

src/libraries/System.Diagnostics.EventLog/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Open</StrongNameKeyId>
5+
<IsWindowsSpecific>true</IsWindowsSpecific>
56
</PropertyGroup>
67
</Project>

src/libraries/System.Diagnostics.PerformanceCounter/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
<Import Project="..\Directory.Build.props" />
33
<PropertyGroup>
44
<StrongNameKeyId>Open</StrongNameKeyId>
5+
<IsWindowsSpecific>true</IsWindowsSpecific>
56
</PropertyGroup>
67
</Project>

src/libraries/System.Diagnostics.Process/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<PropertyGroup>
44
<StrongNameKeyId>Microsoft</StrongNameKeyId>
55
<IsNETCoreApp>true</IsNETCoreApp>
6+
<IncludePlatformAttributes>true</IncludePlatformAttributes>
67
</PropertyGroup>
78
</Project>

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public Process() { }
4141
public System.Diagnostics.ProcessModule? MainModule { get { throw null; } }
4242
public System.IntPtr MainWindowHandle { get { throw null; } }
4343
public string MainWindowTitle { get { throw null; } }
44-
public System.IntPtr MaxWorkingSet { get { throw null; } set { } }
45-
public System.IntPtr MinWorkingSet { get { throw null; } set { } }
44+
public System.IntPtr MaxWorkingSet { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
45+
public System.IntPtr MinWorkingSet { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
4646
public System.Diagnostics.ProcessModuleCollection Modules { get { throw null; } }
4747
[System.ObsoleteAttribute("This property has been deprecated. Please use System.Diagnostics.Process.NonpagedSystemMemorySize64 instead. https://go.microsoft.com/fwlink/?linkid=14202")]
4848
public int NonpagedSystemMemorySize { get { throw null; } }
@@ -116,8 +116,10 @@ public void Refresh() { }
116116
public static System.Diagnostics.Process Start(string fileName) { throw null; }
117117
public static System.Diagnostics.Process Start(string fileName, string arguments) { throw null; }
118118
[System.CLSCompliantAttribute(false)]
119+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
119120
public static System.Diagnostics.Process Start(string fileName, string userName, System.Security.SecureString password, string domain) { throw null; }
120121
[System.CLSCompliantAttribute(false)]
122+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
121123
public static System.Diagnostics.Process Start(string fileName, string arguments, string userName, System.Security.SecureString password, string domain) { throw null; }
122124
public override string ToString() { throw null; }
123125
public void WaitForExit() { }
@@ -163,15 +165,19 @@ public ProcessStartInfo(string fileName, string arguments) { }
163165
public System.Collections.ObjectModel.Collection<string> ArgumentList { get { throw null; } }
164166
public string Arguments { get { throw null; } set { } }
165167
public bool CreateNoWindow { get { throw null; } set { } }
168+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
166169
public string Domain { get { throw null; } set { } }
167170
public System.Collections.Generic.IDictionary<string, string?> Environment { get { throw null; } }
168171
public System.Collections.Specialized.StringDictionary EnvironmentVariables { get { throw null; } }
169172
public bool ErrorDialog { get { throw null; } set { } }
170173
public System.IntPtr ErrorDialogParentHandle { get { throw null; } set { } }
171174
public string FileName { get { throw null; } set { } }
175+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
172176
public bool LoadUserProfile { get { throw null; } set { } }
173177
[System.CLSCompliantAttribute(false)]
178+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
174179
public System.Security.SecureString? Password { get { throw null; } set { } }
180+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
175181
public string? PasswordInClearText { get { throw null; } set { } }
176182
public bool RedirectStandardError { get { throw null; } set { } }
177183
public bool RedirectStandardInput { get { throw null; } set { } }
@@ -196,8 +202,9 @@ internal ProcessThread() { }
196202
public int Id { get { throw null; } }
197203
public int IdealProcessor { set { } }
198204
public bool PriorityBoostEnabled { get { throw null; } set { } }
199-
public System.Diagnostics.ThreadPriorityLevel PriorityLevel { get { throw null; } set { } }
205+
public System.Diagnostics.ThreadPriorityLevel PriorityLevel { get { throw null; } [System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")] set { } }
200206
public System.TimeSpan PrivilegedProcessorTime { get { throw null; } }
207+
[System.Runtime.Versioning.MinimumOSPlatformAttribute("windows7.0")]
201208
public System.IntPtr ProcessorAffinity { set { } }
202209
public System.IntPtr StartAddress { get { throw null; } }
203210
public System.DateTime StartTime { get { throw null; } }

0 commit comments

Comments
 (0)