Uh oh!
There was an error while loading. Please reload this page.
mark Windows-specific APIs as such - #39265
Conversation
…referenced in < .NET 5 libraries
…bute for Windows Specific libraries
Dotnet-GitSync-Bot
commented
Jul 14, 2020
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Uh oh!
There was an error while loading. Please reload this page.
…Certificates namespace
…iagnostics.Process namespace" This reverts commit 891848f.
…sting SYSTEM_PRIVATE_CORELIB
adamsitnik
commented
Jul 14, 2020
@jeffhandley it's ready, I've applied the attributes to everything that was on the list except of |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
# Conflicts: # src/libraries/System.IO.FileSystem.DriveInfo/ref/System.IO.FileSystem.DriveInfo.cs # src/libraries/System.IO.FileSystem.DriveInfo/src/System/IO/DriveInfo.Unix.cs
jkotas
commented
Jul 15, 2020
Nit: I do not think it is worth making distinction between 1 vs 2+ usages. I believe that we typically import namespace even just for 1 usage. |
jeffhandley
left a comment
There was a problem hiding this comment.
This is great, @adamsitnik! I just recommend converting all of the src attributes to drop the "Attribute" suffix and use using statements, but otherwise it looks great to me.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ts where this file is included
… from other projects
jeffhandley
left a comment
There was a problem hiding this comment.
LGTM but I defer to @ViktorHofer and @safern on the infrastructure details. Thanks for trimming up the syntax on the attributes!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ViktorHofer
left a comment
There was a problem hiding this comment.
LGTM besides my two comments.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
* 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>
@jeffhandley this is just a draft now, I will mark it as ready and remove the "no merge" label as soon as I annotate all types and methods (a matter of hours I hope)