From ebd9b2216975db62c5759355620beb9f76e21a83 Mon Sep 17 00:00:00 2001 From: Sebastien Pouliot Date: Thu, 27 Sep 2018 16:39:06 -0400 Subject: [PATCH] Apply XM audit fixes from `xcode10` Backport of https://github.com/xamarin/xamarin-macios/commit/b40230c09d557991b776de918b047442cd41533f --- src/AppKit/Enums.cs | 2 +- src/appkit.cs | 15 ++++++--------- src/foundation.cs | 4 ++++ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/AppKit/Enums.cs b/src/AppKit/Enums.cs index db15b7ed77c3..e4460421e2a8 100644 --- a/src/AppKit/Enums.cs +++ b/src/AppKit/Enums.cs @@ -2542,7 +2542,7 @@ public enum NSVisualEffectMaterial : long { [Mac (10,14)] WindowBackground = 12, [Mac (10,14)] - HUDWindow = 13, + HudWindow = 13, [Mac (10,14)] FullScreenUI = 15, [Mac (10,14)] diff --git a/src/appkit.cs b/src/appkit.cs index 448fa0a74f55..8b12adfd1289 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -4120,7 +4120,7 @@ partial interface NSColor : NSCoding, NSCopying, NSSecureCoding, NSPasteboardRea [Mac (10,14, onlyOn64: true)] [Export ("colorWithSystemEffect:")] - NSColor WithSystemEffect (NSColorSystemEffect systemEffect); + NSColor FromSystemEffect (NSColorSystemEffect systemEffect); [Mac (10, 13)] [Static] @@ -7925,16 +7925,13 @@ partial interface NSMenu : NSCoding, NSCopying, NSAccessibility, NSAccessibility [PostSnippet ("__mt_items_var = ItemArray();")] void RemoveAllItems (); -#if XAMCORE_4_0 [Export ("itemArray", ArgumentSemantic.Copy)] - NSMenuItem[] ItemArray { get; [Mac (10, 14, onlyOn64: true)] set; } -#else - [Export ("itemArray")] - NSMenuItem [] ItemArray (); + NSMenuItem[] Items { get; [Mac (10, 14, onlyOn64: true)] set; } - [Mac (10, 14, onlyOn64: true)] - [Export ("setItemArray:")] - void SetItemArray (NSMenuItem [] items); +#if !XAMCORE_4_0 + [Obsolete ("Use 'Items' instead.")] + [Wrap ("Items", IsVirtual = true)] + NSMenuItem [] ItemArray (); #endif [Export ("numberOfItems")] diff --git a/src/foundation.cs b/src/foundation.cs index 3532d79ab58a..46e97e7226a3 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -12351,7 +12351,11 @@ interface NSFileManager_NSUserInformation { partial interface NSFilePresenter { [Abstract] [Export ("presentedItemURL", ArgumentSemantic.Retain)] +#if XAMCORE_4_0 + NSUrl PresentedItemUrl { get; } +#else NSUrl PresentedItemURL { get; } +#endif #if XAMCORE_2_0 [Abstract]