From a6b3da8f34fa297e5b205b91efb8faa803119dd3 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 27 Feb 2025 15:42:55 +0100 Subject: [PATCH] [AppKit] Fix all availability attributes in this framework. * Add missing availability attributes for .NET. * Remove !.NET availability attributes / code. * Remove redundant .NET availability attributes. * Don't use deprecated APIs when there's an equivalent non-deprecated version available. This is a step towards fixing https://github.com/dotnet/macios/issues/21185. --- src/AppKit/AppKitThreadAccessException.cs | 2 - src/AppKit/Defs.cs | 2 - src/AppKit/NSAccessibility.cs | 8 ---- src/AppKit/NSBezierPath.cs | 4 -- src/AppKit/NSButton.cs | 20 ---------- src/AppKit/NSFont.cs | 38 ------------------- src/AppKit/NSGestureRecognizer.cs | 6 --- src/AppKit/NSGraphics.cs | 18 --------- src/AppKit/NSSegmentedControl.cs | 4 -- src/AppKit/NSSlider.cs | 4 -- src/AppKit/NSStringAttributes.cs | 2 +- src/AppKit/NSStringDrawing.cs | 8 ++-- src/AppKit/NSTextContainer.cs | 20 ++++------ src/AppKit/NSWorkspace.cs | 16 +++----- .../ApiAvailabilityTest.KnownFailures.cs | 3 -- tests/cecil-tests/ApiAvailabilityTest.cs | 2 +- 16 files changed, 18 insertions(+), 139 deletions(-) diff --git a/src/AppKit/AppKitThreadAccessException.cs b/src/AppKit/AppKitThreadAccessException.cs index 5f6111fe1171..f3bff384547e 100644 --- a/src/AppKit/AppKitThreadAccessException.cs +++ b/src/AppKit/AppKitThreadAccessException.cs @@ -4,10 +4,8 @@ #nullable enable namespace AppKit { -#if NET [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#endif public class AppKitThreadAccessException : Exception { public AppKitThreadAccessException () : base ("AppKit Consistency error: you are calling a method that can only be invoked from the UI thread.") { diff --git a/src/AppKit/Defs.cs b/src/AppKit/Defs.cs index 0a3458990d0e..2e5d0b56b57f 100644 --- a/src/AppKit/Defs.cs +++ b/src/AppKit/Defs.cs @@ -29,10 +29,8 @@ #nullable enable namespace AppKit { -#if NET [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] -#endif [StructLayout (LayoutKind.Sequential)] public struct NSEdgeInsets { public nfloat Top; diff --git a/src/AppKit/NSAccessibility.cs b/src/AppKit/NSAccessibility.cs index f508e85a779d..d0c674c07d66 100644 --- a/src/AppKit/NSAccessibility.cs +++ b/src/AppKit/NSAccessibility.cs @@ -26,14 +26,9 @@ namespace AppKit { public partial interface INSAccessibility { } -#if NET [SupportedOSPlatform ("macos")] -#endif public partial class NSAccessibility { #if !COREBUILD -#if NET - [SupportedOSPlatform ("macos")] -#endif [DllImport (Constants.AppKitLibrary)] static extern CGRect NSAccessibilityFrameInView (NativeHandle parentView, CGRect frame); @@ -42,9 +37,6 @@ public static CGRect GetFrameInView (NSView parentView, CGRect frame) return NSAccessibilityFrameInView (parentView.GetHandle (), frame); } -#if NET - [SupportedOSPlatform ("macos")] -#endif [DllImport (Constants.AppKitLibrary)] static extern CGPoint NSAccessibilityPointInView (NativeHandle parentView, CGPoint point); diff --git a/src/AppKit/NSBezierPath.cs b/src/AppKit/NSBezierPath.cs index d5c9de84b2d6..6aab137affea 100644 --- a/src/AppKit/NSBezierPath.cs +++ b/src/AppKit/NSBezierPath.cs @@ -123,10 +123,6 @@ public unsafe void AppendPathWithGlyphs (uint [] glyphs, NSFont font) } #endif -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public unsafe void Append (uint [] glyphs, NSFont font) { if (glyphs is null) diff --git a/src/AppKit/NSButton.cs b/src/AppKit/NSButton.cs index 1546b16a5711..a0cd5ca81d77 100644 --- a/src/AppKit/NSButton.cs +++ b/src/AppKit/NSButton.cs @@ -51,10 +51,6 @@ public partial class NSButton { set { base.Cell = value; } } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSButton CreateButton (string title, NSImage image, Action action) { var dispatcher = new NSActionDispatcher (action); @@ -63,10 +59,6 @@ public static NSButton CreateButton (string title, NSImage image, Action action) return control; } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSButton CreateButton (string title, Action action) { var dispatcher = new NSActionDispatcher (action); @@ -75,10 +67,6 @@ public static NSButton CreateButton (string title, Action action) return control; } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSButton CreateButton (NSImage image, Action action) { var dispatcher = new NSActionDispatcher (action); @@ -87,10 +75,6 @@ public static NSButton CreateButton (NSImage image, Action action) return control; } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSButton CreateCheckbox (string title, Action action) { var dispatcher = new NSActionDispatcher (action); @@ -99,10 +83,6 @@ public static NSButton CreateCheckbox (string title, Action action) return control; } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSButton CreateRadioButton (string title, Action action) { var dispatcher = new NSActionDispatcher (action); diff --git a/src/AppKit/NSFont.cs b/src/AppKit/NSFont.cs index de3c4304ccf4..d63de5c9091c 100644 --- a/src/AppKit/NSFont.cs +++ b/src/AppKit/NSFont.cs @@ -21,10 +21,6 @@ public partial class NSFont { return new NSFont (font.Handle); } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public unsafe CGRect [] GetBoundingRects (CGGlyph [] glyphs) { if (glyphs is null) @@ -41,10 +37,6 @@ public unsafe CGRect [] GetBoundingRects (CGGlyph [] glyphs) return bounds; } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public unsafe CGSize [] GetAdvancements (CGGlyph [] glyphs) { if (glyphs is null) @@ -151,13 +143,9 @@ public unsafe CGSize [] GetAdvancements (CGGlyph [] glyphs) return ptr == IntPtr.Zero ? null : new NSFont (ptr); } -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos10.13")] [UnsupportedOSPlatform ("maccatalyst")] -#else - [Deprecated (PlatformName.MacOSX, 10, 13)] -#endif public virtual NSFont? PrinterFont { get { var ptr = _PrinterFont; @@ -165,13 +153,9 @@ public virtual NSFont? PrinterFont { } } -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos10.13")] [UnsupportedOSPlatform ("maccatalyst")] -#else - [Deprecated (PlatformName.MacOSX, 10, 13)] -#endif public virtual NSFont? ScreenFont { get { var ptr = _ScreenFont; @@ -179,13 +163,9 @@ public virtual NSFont? ScreenFont { } } -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos10.13")] [UnsupportedOSPlatform ("maccatalyst")] -#else - [Deprecated (PlatformName.MacOSX, 10, 13)] -#endif public virtual NSFont? ScreenFontWithRenderingMode (NSFontRenderingMode renderingMode) { var ptr = _ScreenFontWithRenderingMode (renderingMode); @@ -198,42 +178,24 @@ public virtual NSFont? ScreenFont { return ptr == IntPtr.Zero ? null : new NSFont (ptr); } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSFont? SystemFontOfSize (nfloat fontSize, nfloat weight) { var ptr = _SystemFontOfSize (fontSize, weight); return ptr == IntPtr.Zero ? null : new NSFont (ptr); } -#if NET - [SupportedOSPlatform ("macos13.0")] - [UnsupportedOSPlatform ("maccatalyst")] -#else - [Mac (13, 0)] -#endif public static NSFont? SystemFontOfSize (nfloat fontSize, nfloat weight, nfloat width) { var ptr = _SystemFontOfSize (fontSize, weight, width); return ptr == IntPtr.Zero ? null : new NSFont (ptr); } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSFont? MonospacedDigitSystemFontOfSize (nfloat fontSize, nfloat weight) { var ptr = _MonospacedDigitSystemFontOfSize (fontSize, weight); return ptr == IntPtr.Zero ? null : new NSFont (ptr); } -#if NET - [SupportedOSPlatform ("macos")] - [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSFont? MonospacedSystemFont (nfloat fontSize, nfloat weight) { var ptr = _MonospacedSystemFont (fontSize, weight); diff --git a/src/AppKit/NSGestureRecognizer.cs b/src/AppKit/NSGestureRecognizer.cs index 010fb5fc498d..2ac9699a83dc 100644 --- a/src/AppKit/NSGestureRecognizer.cs +++ b/src/AppKit/NSGestureRecognizer.cs @@ -36,10 +36,8 @@ public NSGestureRecognizer (Selector sel, Token token) : this (token, sel) MarkDirty (); } -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif [Register ("__NSGestureRecognizerToken")] [Preserve (Conditional = true)] public class Token : NSObject { @@ -49,10 +47,8 @@ public Token () } } -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif [Register ("__NSGestureRecognizerParameterlessToken")] [Preserve (Conditional = true)] public class ParameterlessDispatch : Token { @@ -71,10 +67,8 @@ public void Activated () } } -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif [Register ("__NSGestureRecognizerParametrizedToken")] [Preserve (Conditional = true)] public class ParametrizedDispatch : Token { diff --git a/src/AppKit/NSGraphics.cs b/src/AppKit/NSGraphics.cs index 617f034b17ef..e19c5832d01b 100644 --- a/src/AppKit/NSGraphics.cs +++ b/src/AppKit/NSGraphics.cs @@ -38,9 +38,7 @@ #nullable enable namespace AppKit { -#if NET [SupportedOSPlatform ("macos")] -#endif public static class NSGraphics { public static readonly float White = 1; public static readonly float Black = 0; @@ -179,21 +177,13 @@ public static void FrameRect (CGRect rect, nfloat frameWidth, NSCompositingOpera NSFrameRectWithWidthUsingOperation (rect, frameWidth, (nuint) (ulong) operation); } -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead.")] -#else - [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")] -#endif [DllImport (Constants.AppKitLibrary, EntryPoint = "NSShowAnimationEffect")] extern static void NSShowAnimationEffect (nuint animationEffect, CGPoint centerLocation, CGSize size, NativeHandle animationDelegate, NativeHandle didEndSelector, IntPtr contextInfo); -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead.")] -#else - [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")] -#endif public static void ShowAnimationEffect (NSAnimationEffect animationEffect, CGPoint centerLocation, CGSize size, NSObject animationDelegate, Selector didEndSelector, IntPtr contextInfo) { NSShowAnimationEffect ((nuint) (ulong) animationEffect, centerLocation, size, animationDelegate.GetHandle (), didEndSelector.Handle, contextInfo); @@ -250,21 +240,13 @@ public static CGRect DrawTiledRects (CGRect aRect, CGRect clipRect, NSRectEdge [ [DllImport (Constants.AppKitLibrary, EntryPoint = "NSDrawWindowBackground")] public extern static void DrawWindowBackground (CGRect aRect); -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos10.11", "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")] -#else - [Deprecated (PlatformName.MacOSX, 10, 11, message: "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")] -#endif [DllImport (Constants.AppKitLibrary, EntryPoint = "NSDisableScreenUpdates")] public extern static void DisableScreenUpdates (); -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos10.11", "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")] -#else - [Deprecated (PlatformName.MacOSX, 10, 11, message: "Not usually necessary, 'NSAnimationContext.RunAnimation' can be used instead and not suffer from performance issues.")] -#endif [DllImport (Constants.AppKitLibrary, EntryPoint = "NSEnableScreenUpdates")] public extern static void EnableScreenUpdates (); diff --git a/src/AppKit/NSSegmentedControl.cs b/src/AppKit/NSSegmentedControl.cs index 53b837cc43a3..f2e2eea5b0c7 100644 --- a/src/AppKit/NSSegmentedControl.cs +++ b/src/AppKit/NSSegmentedControl.cs @@ -23,10 +23,8 @@ public partial class NSSegmentedControl { set { base.Cell = value; } } -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSSegmentedControl FromLabels (string [] labels, NSSegmentSwitchTracking trackingMode, Action action) { var dispatcher = new NSActionDispatcher (action); @@ -35,10 +33,8 @@ public static NSSegmentedControl FromLabels (string [] labels, NSSegmentSwitchTr return control; } -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSSegmentedControl FromImages (NSImage [] images, NSSegmentSwitchTracking trackingMode, Action action) { var dispatcher = new NSActionDispatcher (action); diff --git a/src/AppKit/NSSlider.cs b/src/AppKit/NSSlider.cs index 6f3c24ffa138..dfa3033120a7 100644 --- a/src/AppKit/NSSlider.cs +++ b/src/AppKit/NSSlider.cs @@ -39,10 +39,8 @@ namespace AppKit { public partial class NSSlider { NSActionDispatcher? dispatcher; -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSSlider FromTarget (Action action) { var dispatcher = new NSActionDispatcher (action); @@ -51,10 +49,8 @@ public static NSSlider FromTarget (Action action) return control; } -#if NET [SupportedOSPlatform ("macos")] [UnsupportedOSPlatform ("maccatalyst")] -#endif public static NSSlider FromValue (double value, double minValue, double maxValue, Action action) { var dispatcher = new NSActionDispatcher (action); diff --git a/src/AppKit/NSStringAttributes.cs b/src/AppKit/NSStringAttributes.cs index 3e9e27414212..550e5efd6228 100644 --- a/src/AppKit/NSStringAttributes.cs +++ b/src/AppKit/NSStringAttributes.cs @@ -205,7 +205,7 @@ int SetUnderlineStyle (NSString attr, NSUnderlineStyle style, { var value = (int) style | (int) pattern; if (byWord) { - value |= (int) NSAttributedString.UnderlineByWordMaskAttributeName; + value |= (int) NSUnderlineStyle.ByWord; } SetNumberValue (attr, value); diff --git a/src/AppKit/NSStringDrawing.cs b/src/AppKit/NSStringDrawing.cs index 2e25d8129690..5b0ea9488187 100644 --- a/src/AppKit/NSStringDrawing.cs +++ b/src/AppKit/NSStringDrawing.cs @@ -9,12 +9,10 @@ namespace AppKit { -#if NET [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("tvos")] -#endif + [UnsupportedOSPlatform ("ios")] + [UnsupportedOSPlatform ("tvos")] + [UnsupportedOSPlatform ("maccatalyst")] // Manual bindings, easier than make the generator support extension methods on non-NSObject-derived types (string in this case). public unsafe static partial class NSStringDrawing { public static void DrawAtPoint (this string This, CGPoint point, NSDictionary? attributes) diff --git a/src/AppKit/NSTextContainer.cs b/src/AppKit/NSTextContainer.cs index 1493f83a4fa4..00fb8a7df23f 100644 --- a/src/AppKit/NSTextContainer.cs +++ b/src/AppKit/NSTextContainer.cs @@ -23,26 +23,20 @@ internal NSTextContainer (CGSize size, bool isContainer) Handle = InitWithSize (size); } -#if NET [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("tvos")] -#endif + [UnsupportedOSPlatform ("ios")] + [UnsupportedOSPlatform ("maccatalyst")] + [UnsupportedOSPlatform ("tvos")] public static NSTextContainer FromSize (CGSize size) { return new NSTextContainer (size, false); } -#if NET - [SupportedOSPlatform ("ios")] + [UnsupportedOSPlatform ("ios")] [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("tvos")] - [ObsoletedOSPlatform ("macos10.11", "Use NSTextContainer.FromSize instead.")] -#else - [Deprecated (PlatformName.MacOSX, 10, 11, message: "Use NSTextContainer.FromSize instead.")] -#endif + [UnsupportedOSPlatform ("maccatalyst")] + [UnsupportedOSPlatform ("tvos")] + [ObsoletedOSPlatform ("macos", "Use NSTextContainer.FromSize instead.")] public static NSTextContainer FromContainerSize (CGSize containerSize) { return new NSTextContainer (containerSize, true); diff --git a/src/AppKit/NSWorkspace.cs b/src/AppKit/NSWorkspace.cs index 305fe1a4d561..584b58da858f 100644 --- a/src/AppKit/NSWorkspace.cs +++ b/src/AppKit/NSWorkspace.cs @@ -12,32 +12,26 @@ namespace AppKit { public partial class NSWorkspace { -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos11.0", "Use 'NSWorkspace.OpenUrls' with completion handler.")] [UnsupportedOSPlatform ("maccatalyst")] -#else - [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSWorkspace.OpenUrls' with completion handler.")] -#endif public virtual bool OpenUrls (NSUrl [] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor, string [] identifiers) { // Ignore the passed in argument, because if you pass it in we will crash on cleanup. return _OpenUrls (urls, bundleIdentifier, options, descriptor, null); } -#if NET [SupportedOSPlatform ("macos")] [ObsoletedOSPlatform ("macos11.0", "Use 'NSWorkspace.OpenUrls' with completion handler.")] [UnsupportedOSPlatform ("maccatalyst")] -#else - [Deprecated (PlatformName.MacOSX, 11, 0, message: "Use 'NSWorkspace.OpenUrls' with completion handler.")] -#endif public virtual bool OpenUrls (NSUrl [] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor) { return _OpenUrls (urls, bundleIdentifier, options, descriptor, null); } - [Advice ("Use 'NSWorkSpace.IconForContentType' instead.")] + [ObsoletedOSPlatform ("macos", "Use 'NSWorkspace.GetIcon' instead.")] + [UnsupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] public virtual NSImage IconForFileType (string fileType) { var nsFileType = NSString.CreateNative (fileType); @@ -48,7 +42,9 @@ public virtual NSImage IconForFileType (string fileType) } } - [Advice ("Use 'NSWorkSpace.IconForContentType' instead.")] + [ObsoletedOSPlatform ("macos", "Use 'NSWorkspace.GetIcon' instead.")] + [UnsupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] public virtual NSImage IconForFileType (HfsTypeCode typeCode) { var nsFileType = GetNSFileType ((uint) typeCode); diff --git a/tests/cecil-tests/ApiAvailabilityTest.KnownFailures.cs b/tests/cecil-tests/ApiAvailabilityTest.KnownFailures.cs index 5e7ba54a8e29..62b1704fa87f 100644 --- a/tests/cecil-tests/ApiAvailabilityTest.KnownFailures.cs +++ b/tests/cecil-tests/ApiAvailabilityTest.KnownFailures.cs @@ -17,9 +17,6 @@ namespace Cecil.Tests { public partial class ApiAvailabilityTest { static HashSet knownFailuresAvailabilityWarnings = new HashSet { - "/src/AppKit/NSStringAttributes.cs has 1 occurrences of This call site is reachable on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. 'NSAttributedString.UnderlineByWordMaskAttributeName.get' is obsoleted on: 'macOS/OSX' 10.11 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422)", - "/src/AppKit/NSStringAttributes.cs has 1 occurrences of This call site is reachable on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. 'NSAttributedString.UnderlineByWordMaskAttributeName.get' is supported on: 'macOS/OSX'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)", - "/src/AppKit/NSStringAttributes.cs has 1 occurrences of This call site is reachable on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. 'NSAttributedString.UnderlineByWordMaskAttributeName' is obsoleted on: 'macOS/OSX' 10.11 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422)", "/src/arkit.cs has 3 occurrences of This call site is reachable on all platforms. 'iOSAttribute' is supported on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)", "/src/AudioToolbox/Enums.cs has 12 occurrences of This call site is reachable on all platforms. 'iOSAttribute' is supported on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1416)", "/src/AudioToolbox/MusicSequence.cs has 4 occurrences of This call site is reachable on: 'ios' 12.2 and later, 'maccatalyst' 12.2 and later, 'macOS/OSX' 12.0 and later, 'tvos' 12.2 and later. 'AUGraph' is obsoleted on: 'ios' 14.0 and later (Use 'AVAudioEngine' instead.), 'maccatalyst' 14.0 and later (Use 'AVAudioEngine' instead.), 'macOS/OSX' 11.0 and later (Use 'AVAudioEngine' instead.), 'tvos' 14.0 and later (Use 'AVAudioEngine' instead.). (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1422)", diff --git a/tests/cecil-tests/ApiAvailabilityTest.cs b/tests/cecil-tests/ApiAvailabilityTest.cs index f5db11606f08..5917c803e279 100644 --- a/tests/cecil-tests/ApiAvailabilityTest.cs +++ b/tests/cecil-tests/ApiAvailabilityTest.cs @@ -69,7 +69,7 @@ public void Warnings () } finally { Console.WriteLine ($"There's a total of {totalWarnings} warnings."); } - Assert.AreEqual (3669, totalWarnings, "Total warnings"); // this is just to see how the warning count changes as issues are fixed. + Assert.AreEqual (3666, totalWarnings, "Total warnings"); // this is just to see how the warning count changes as issues are fixed. } public record ObsoletedFailure : IComparable {