Skip to content
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

Fix platform analyzer attribute order for MacCatalyst #105409

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ private static ref readonly byte GetSwiftRef(ReadOnlySpan<byte> b)

[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void ChaCha20Poly1305Encrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down Expand Up @@ -68,9 +68,9 @@ internal static unsafe void ChaCha20Poly1305Encrypt(

[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void ChaCha20Poly1305Decrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down Expand Up @@ -113,9 +113,9 @@ internal static unsafe void ChaCha20Poly1305Decrypt(

[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void AesGcmEncrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down Expand Up @@ -151,9 +151,9 @@ internal static unsafe void AesGcmEncrypt(

[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
internal static unsafe void AesGcmDecrypt(
ReadOnlySpan<byte> key,
ReadOnlySpan<byte> nonce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,10 @@ private static IEnumerable<Measurement<long>> GetGarbageCollectionCounts()
}
}

[SupportedOSPlatform("maccatalyst")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[UnsupportedOSPlatform("browser")]
[SupportedOSPlatform("maccatalyst")]
private static IEnumerable<Measurement<double>> GetCpuTime()
{
Debug.Assert(s_processCpuTime is not null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ private static int CheckedSysConf(Interop.Sys.SysConfName name)
/// Get the CPU usage, including the process time spent running the application code, the process time spent running the operating system code,
/// and the total time spent running both the application and operating system code.
/// </summary>
[SupportedOSPlatform("maccatalyst")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[UnsupportedOSPlatform("browser")]
[SupportedOSPlatform("maccatalyst")]
public static ProcessCpuUsage CpuUsage
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,10 @@ private static unsafe string[] SegmentCommandLine(char* cmdLine)
/// Get the CPU usage, including the process time spent running the application code, the process time spent running the operating system code,
/// and the total time spent running both the application and operating system code.
/// </summary>
[SupportedOSPlatform("maccatalyst")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[UnsupportedOSPlatform("browser")]
[SupportedOSPlatform("maccatalyst")]
public static ProcessCpuUsage CpuUsage
{
get => Interop.Kernel32.GetProcessTimes(Interop.Kernel32.GetCurrentProcess(), out _, out _, out long procKernelTime, out long procUserTime) ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ public override void GenerateKey() { }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
public sealed partial class AesGcm : System.IDisposable
{
[System.ObsoleteAttribute("AesGcm should indicate the required tag size for encryption and decryption. Use a constructor that accepts the tag size.", DiagnosticId="SYSLIB0053", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
Expand Down Expand Up @@ -287,9 +287,9 @@ public AuthenticationTagMismatchException(string? message, System.Exception? inn
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.SupportedOSPlatform("ios13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("tvos13.0")]
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
public sealed partial class ChaCha20Poly1305 : System.IDisposable
{
public ChaCha20Poly1305(byte[] key) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ namespace System.Security.Cryptography
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
public sealed partial class AesGcm : IDisposable
{
private const int NonceSize = 12;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ namespace System.Security.Cryptography
[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
[SupportedOSPlatform("maccatalyst")]
[SupportedOSPlatform("ios13.0")]
[SupportedOSPlatform("tvos13.0")]
[SupportedOSPlatform("maccatalyst")]
public sealed partial class ChaCha20Poly1305 : IDisposable
{
// Per https://tools.ietf.org/html/rfc7539, ChaCha20Poly1305 AEAD requires a 256-bit key and 96-bit nonce,
Expand Down
Loading