Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created September 11, 2023 17:28
Show Gist options
  • Save vs-mobiletools-engineering-service2/634b3fd64a6123fe87e9c1a868399af9 to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/634b3fd64a6123fe87e9c1a868399af9 to your computer and use it in GitHub Desktop.
generator-diff/generator.diff
diff --git a/old/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs b/new/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs
index 51526cb..13330ab 100644
--- a/old/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs
+++ b/new/dotnet/IDE/obj/common/bgen/bgen.AssemblyInfo.cs
@@ -13,7 +13,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("bgen")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e54983e0efa19b9ce0e50f1d76a496932c15f6fd")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+2dd92c0da0628423573c1aa82e88214d9be29e9e")]
[assembly: System.Reflection.AssemblyProductAttribute("bgen")]
[assembly: System.Reflection.AssemblyTitleAttribute("bgen")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
diff --git a/old/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json b/new/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json
index 52de177..7f887dc 100644
--- a/old/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json
+++ b/new/dotnet/IDE/obj/common/bgen/bgen.sourcelink.json
@@ -1 +1 @@
-{"documents":{"/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/*":"https://raw.githubusercontent.com/xamarin/xamarin-macios/e54983e0efa19b9ce0e50f1d76a496932c15f6fd/*","/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/external/api-tools/*":"https://raw.githubusercontent.com/rolfbjarne/api-tools/c7d5208967d6d46fdebcac82ade488f00e1fcc50/*","/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/external/macios-binaries/*":"https://raw.githubusercontent.com/xamarin/macios-binaries/7813391e75d7373ee073ef2d5716e3c607c8636a/*","/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/external/MonoTouch.Dialog/*":"https://raw.githubusercontent.com/migueldeicaza/MonoTouch.Dialog/f500f9a48dbf856c693b255078e1507cf1e8edde/*","/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/external/opentk/*":"https://raw.githubusercontent.com/mono/opentk/396bc90c7ac2e7ce442840a5e8bd91e5e79b381e/*","/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/external/Touch.Unit/*":"https://raw.githubusercontent.com/spouliot/Touch.Unit/5739adefc261b7bfeb70ff718c7b2d97bdfa42ee/*","/Users/builder/azdo/_work/1/a/change-detection/tmp/src/xamarin-macios/external/Xamarin.MacDev/*":"https://raw.githubusercontent.com/xamarin/Xamarin.MacDev/b454d454a687d9aa26a382ad16f1a9361b06b074/*"}}
\ No newline at end of file
+{"documents":{"/Users/builder/azdo/_work/1/s/xamarin-macios/*":"https://raw.githubusercontent.com/xamarin/xamarin-macios/2dd92c0da0628423573c1aa82e88214d9be29e9e/*","/Users/builder/azdo/_work/1/s/xamarin-macios/external/api-tools/*":"https://raw.githubusercontent.com/rolfbjarne/api-tools/c7d5208967d6d46fdebcac82ade488f00e1fcc50/*","/Users/builder/azdo/_work/1/s/xamarin-macios/external/macios-binaries/*":"https://raw.githubusercontent.com/xamarin/macios-binaries/7813391e75d7373ee073ef2d5716e3c607c8636a/*","/Users/builder/azdo/_work/1/s/xamarin-macios/external/MonoTouch.Dialog/*":"https://raw.githubusercontent.com/migueldeicaza/MonoTouch.Dialog/f500f9a48dbf856c693b255078e1507cf1e8edde/*","/Users/builder/azdo/_work/1/s/xamarin-macios/external/opentk/*":"https://raw.githubusercontent.com/mono/opentk/396bc90c7ac2e7ce442840a5e8bd91e5e79b381e/*","/Users/builder/azdo/_work/1/s/xamarin-macios/external/Touch.Unit/*":"https://raw.githubusercontent.com/spouliot/Touch.Unit/5739adefc261b7bfeb70ff718c7b2d97bdfa42ee/*","/Users/builder/azdo/_work/1/s/xamarin-macios/external/Xamarin.MacDev/*":"https://raw.githubusercontent.com/xamarin/Xamarin.MacDev/b454d454a687d9aa26a382ad16f1a9361b06b074/*"}}
\ No newline at end of file
diff --git a/old/dotnet/ios/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs b/new/dotnet/ios/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
index 0ae3a44..cb3b8d8 100644
--- a/old/dotnet/ios/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
+++ b/new/dotnet/ios/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
@@ -117,6 +117,48 @@ namespace CoreSpotlight {
}
CFString.ReleaseNative (nsname);
}
+ [Export ("initWithName:protectionClass:bundleIdentifier:options:")]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSString? protectionClass, string bundleIdentifier, nint options)
+ : base (NSObjectFlag.Empty)
+ {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ if (name is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (name));
+ var protectionClass__handle__ = protectionClass.GetHandle ();
+ if (bundleIdentifier is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bundleIdentifier));
+ var nsname = CFString.CreateNative (name);
+ var nsbundleIdentifier = CFString.CreateNative (bundleIdentifier);
+ if (IsDirectBinding) {
+ InitializeHandle (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend_NativeHandle_NativeHandle_NativeHandle_IntPtr (this.Handle, Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:"), nsname, protectionClass__handle__, nsbundleIdentifier, options), "initWithName:protectionClass:bundleIdentifier:options:");
+ } else {
+ InitializeHandle (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper_NativeHandle_NativeHandle_NativeHandle_IntPtr (this.SuperHandle, Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:"), nsname, protectionClass__handle__, nsbundleIdentifier, options), "initWithName:protectionClass:bundleIdentifier:options:");
+ }
+ CFString.ReleaseNative (nsname);
+ CFString.ReleaseNative (nsbundleIdentifier);
+ #endif
+ }
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options)
+ : this (name, protectionClass.GetConstant (), bundleIdentifier, options)
+ {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ #endif
+ }
[Export ("deleteSearchableItemsWithIdentifiers:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void Delete (string[] identifiers, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V0))]global::System.Action<NSError>? completionHandler)
diff --git a/old/dotnet/ios/generated-sources/CoreSpotlight/CSSuggestion.g.cs b/new/dotnet/ios/generated-sources/CoreSpotlight/CSSuggestion.g.cs
index c06aee2..4607e89 100644
--- a/old/dotnet/ios/generated-sources/CoreSpotlight/CSSuggestion.g.cs
+++ b/new/dotnet/ios/generated-sources/CoreSpotlight/CSSuggestion.g.cs
@@ -180,6 +180,48 @@ namespace CoreSpotlight {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ public virtual NSNumber Score {
+ [Export ("score")]
+ get {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ NSNumber? ret;
+ if (IsDirectBinding) {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend (this.Handle, Selector.GetHandle ("score")))!;
+ } else {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("score")))!;
+ }
+ return ret!;
+ #endif
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ public virtual NSObject[] SuggestionDataSources {
+ [Export ("suggestionDataSources")]
+ get {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ NSObject[]? ret;
+ if (IsDirectBinding) {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend (this.Handle, Selector.GetHandle ("suggestionDataSources")))!;
+ } else {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("suggestionDataSources")))!;
+ }
+ return ret!;
+ #endif
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual CSSuggestionKind SuggestionKind {
[Export ("suggestionKind")]
get {
diff --git a/old/dotnet/ios/generated-sources/Foundation/NSFileManager.g.cs b/new/dotnet/ios/generated-sources/Foundation/NSFileManager.g.cs
index 11fb6f4..686d877 100644
--- a/old/dotnet/ios/generated-sources/Foundation/NSFileManager.g.cs
+++ b/new/dotnet/ios/generated-sources/Foundation/NSFileManager.g.cs
@@ -1050,6 +1050,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1068,6 +1070,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1086,6 +1090,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1122,6 +1128,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
diff --git a/new/dotnet/ios/generated-sources/Foundation/NSFileProtectionType.g.cs b/new/dotnet/ios/generated-sources/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..98e3613
--- /dev/null
+++ b/new/dotnet/ios/generated-sources/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,131 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.Versioning;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using UIKit;
+using GLKit;
+using Metal;
+using CoreML;
+using MapKit;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Contacts;
+using Security;
+using Messages;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using QuickLook;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using CoreMotion;
+using ObjCRuntime;
+using AddressBook;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using NewsstandKit;
+using FileProvider;
+using CoreAnimation;
+using CoreFoundation;
+using NetworkExtension;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs b/new/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
index 818f97f..b2fd13c 100644
--- a/old/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
+++ b/new/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
@@ -117,6 +117,40 @@ namespace CoreSpotlight {
}
CFString.ReleaseNative (nsname);
}
+ [Export ("initWithName:protectionClass:bundleIdentifier:options:")]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSString? protectionClass, string bundleIdentifier, nint options)
+ : base (NSObjectFlag.Empty)
+ {
+ if (name is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (name));
+ var protectionClass__handle__ = protectionClass.GetHandle ();
+ if (bundleIdentifier is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bundleIdentifier));
+ var nsname = CFString.CreateNative (name);
+ var nsbundleIdentifier = CFString.CreateNative (bundleIdentifier);
+ if (IsDirectBinding) {
+ InitializeHandle (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend_NativeHandle_NativeHandle_NativeHandle_IntPtr (this.Handle, Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:"), nsname, protectionClass__handle__, nsbundleIdentifier, options), "initWithName:protectionClass:bundleIdentifier:options:");
+ } else {
+ InitializeHandle (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper_NativeHandle_NativeHandle_NativeHandle_IntPtr (this.SuperHandle, Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:"), nsname, protectionClass__handle__, nsbundleIdentifier, options), "initWithName:protectionClass:bundleIdentifier:options:");
+ }
+ CFString.ReleaseNative (nsname);
+ CFString.ReleaseNative (nsbundleIdentifier);
+ }
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options)
+ : this (name, protectionClass.GetConstant (), bundleIdentifier, options)
+ {
+ }
[Export ("deleteSearchableItemsWithIdentifiers:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void Delete (string[] identifiers, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V17))]global::System.Action<NSError>? completionHandler)
diff --git a/old/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSuggestion.g.cs b/new/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSuggestion.g.cs
index f3b8f0b..65a1b28 100644
--- a/old/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSuggestion.g.cs
+++ b/new/dotnet/maccatalyst/generated-sources/CoreSpotlight/CSSuggestion.g.cs
@@ -158,6 +158,40 @@ namespace CoreSpotlight {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ public virtual NSNumber Score {
+ [Export ("score")]
+ get {
+ NSNumber? ret;
+ if (IsDirectBinding) {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend (this.Handle, Selector.GetHandle ("score")))!;
+ } else {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("score")))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ public virtual NSObject[] SuggestionDataSources {
+ [Export ("suggestionDataSources")]
+ get {
+ NSObject[]? ret;
+ if (IsDirectBinding) {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend (this.Handle, Selector.GetHandle ("suggestionDataSources")))!;
+ } else {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("suggestionDataSources")))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual CSSuggestionKind SuggestionKind {
[Export ("suggestionKind")]
get {
diff --git a/old/dotnet/maccatalyst/generated-sources/Foundation/NSFileManager.g.cs b/new/dotnet/maccatalyst/generated-sources/Foundation/NSFileManager.g.cs
index 10309b7..1bbf8cc 100644
--- a/old/dotnet/maccatalyst/generated-sources/Foundation/NSFileManager.g.cs
+++ b/new/dotnet/maccatalyst/generated-sources/Foundation/NSFileManager.g.cs
@@ -1050,6 +1050,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1068,6 +1070,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1086,6 +1090,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1122,6 +1128,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
diff --git a/new/dotnet/maccatalyst/generated-sources/Foundation/NSFileProtectionType.g.cs b/new/dotnet/maccatalyst/generated-sources/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..a56fb9f
--- /dev/null
+++ b/new/dotnet/maccatalyst/generated-sources/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,131 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.Versioning;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using UIKit;
+using Metal;
+using CoreML;
+using AppKit;
+using MapKit;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Contacts;
+using Security;
+using CloudKit;
+using Messages;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using QuickLook;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using CoreMotion;
+using ObjCRuntime;
+using AddressBook;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using FileProvider;
+using CoreAnimation;
+using CoreFoundation;
+using NetworkExtension;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/dotnet/macos/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs b/new/dotnet/macos/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
index 385ad57..fddc405 100644
--- a/old/dotnet/macos/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
+++ b/new/dotnet/macos/generated-sources/CoreSpotlight/CSSearchableIndex.g.cs
@@ -75,6 +75,9 @@ namespace CoreSpotlight {
const string selInitWithName_X = "initWithName:";
static readonly NativeHandle selInitWithName_XHandle = Selector.GetHandle ("initWithName:");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selInitWithName_ProtectionClass_BundleIdentifier_Options_X = "initWithName:protectionClass:bundleIdentifier:options:";
+ static readonly NativeHandle selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle = Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
const string selIsIndexingAvailableX = "isIndexingAvailable";
static readonly NativeHandle selIsIndexingAvailableXHandle = Selector.GetHandle ("isIndexingAvailable");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
@@ -125,6 +128,40 @@ namespace CoreSpotlight {
}
CFString.ReleaseNative (nsname);
}
+ [Export ("initWithName:protectionClass:bundleIdentifier:options:")]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSString? protectionClass, string bundleIdentifier, nint options)
+ : base (NSObjectFlag.Empty)
+ {
+ if (name is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (name));
+ var protectionClass__handle__ = protectionClass.GetHandle ();
+ if (bundleIdentifier is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bundleIdentifier));
+ var nsname = CFString.CreateNative (name);
+ var nsbundleIdentifier = CFString.CreateNative (bundleIdentifier);
+ if (IsDirectBinding) {
+ InitializeHandle (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend_NativeHandle_NativeHandle_NativeHandle_IntPtr (this.Handle, selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle, nsname, protectionClass__handle__, nsbundleIdentifier, options), "initWithName:protectionClass:bundleIdentifier:options:");
+ } else {
+ InitializeHandle (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper_NativeHandle_NativeHandle_NativeHandle_IntPtr (this.SuperHandle, selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle, nsname, protectionClass__handle__, nsbundleIdentifier, options), "initWithName:protectionClass:bundleIdentifier:options:");
+ }
+ CFString.ReleaseNative (nsname);
+ CFString.ReleaseNative (nsbundleIdentifier);
+ }
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options)
+ : this (name, protectionClass.GetConstant (), bundleIdentifier, options)
+ {
+ }
[Export ("deleteSearchableItemsWithIdentifiers:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void Delete (string[] identifiers, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V16))]global::System.Action<NSError>? completionHandler)
diff --git a/old/dotnet/macos/generated-sources/CoreSpotlight/CSSuggestion.g.cs b/new/dotnet/macos/generated-sources/CoreSpotlight/CSSuggestion.g.cs
index 5a0ac61..4e54afb 100644
--- a/old/dotnet/macos/generated-sources/CoreSpotlight/CSSuggestion.g.cs
+++ b/new/dotnet/macos/generated-sources/CoreSpotlight/CSSuggestion.g.cs
@@ -69,6 +69,12 @@ namespace CoreSpotlight {
const string selLocalizedAttributedSuggestionX = "localizedAttributedSuggestion";
static readonly NativeHandle selLocalizedAttributedSuggestionXHandle = Selector.GetHandle ("localizedAttributedSuggestion");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selScoreX = "score";
+ static readonly NativeHandle selScoreXHandle = Selector.GetHandle ("score");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selSuggestionDataSourcesX = "suggestionDataSources";
+ static readonly NativeHandle selSuggestionDataSourcesXHandle = Selector.GetHandle ("suggestionDataSources");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
const string selSuggestionKindX = "suggestionKind";
static readonly NativeHandle selSuggestionKindXHandle = Selector.GetHandle ("suggestionKind");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
@@ -174,6 +180,40 @@ namespace CoreSpotlight {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ public virtual NSNumber Score {
+ [Export ("score")]
+ get {
+ NSNumber? ret;
+ if (IsDirectBinding) {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend (this.Handle, selScoreXHandle))!;
+ } else {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper (this.SuperHandle, selScoreXHandle))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [SupportedOSPlatform ("ios17.0")]
+ [SupportedOSPlatform ("maccatalyst17.0")]
+ [SupportedOSPlatform ("macos14.0")]
+ [UnsupportedOSPlatform ("tvos")]
+ public virtual NSObject[] SuggestionDataSources {
+ [Export ("suggestionDataSources")]
+ get {
+ NSObject[]? ret;
+ if (IsDirectBinding) {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.NativeHandle_objc_msgSend (this.Handle, selSuggestionDataSourcesXHandle))!;
+ } else {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.NativeHandle_objc_msgSendSuper (this.SuperHandle, selSuggestionDataSourcesXHandle))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual CSSuggestionKind SuggestionKind {
[Export ("suggestionKind")]
get {
diff --git a/old/dotnet/macos/generated-sources/Foundation/NSFileManager.g.cs b/new/dotnet/macos/generated-sources/Foundation/NSFileManager.g.cs
index 653856b..72751fc 100644
--- a/old/dotnet/macos/generated-sources/Foundation/NSFileManager.g.cs
+++ b/new/dotnet/macos/generated-sources/Foundation/NSFileManager.g.cs
@@ -1259,6 +1259,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1277,6 +1279,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1295,6 +1299,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1331,6 +1337,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
diff --git a/new/dotnet/macos/generated-sources/Foundation/NSFileProtectionType.g.cs b/new/dotnet/macos/generated-sources/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..ebd083c
--- /dev/null
+++ b/new/dotnet/macos/generated-sources/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,126 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.Versioning;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using Metal;
+using CoreML;
+using OpenGL;
+using AppKit;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Contacts;
+using Security;
+using CloudKit;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using ObjCRuntime;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using FileProvider;
+using CoreAnimation;
+using CoreFoundation;
+using NetworkExtension;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/dotnet/tvos/generated-sources/Foundation/NSFileManager.g.cs b/new/dotnet/tvos/generated-sources/Foundation/NSFileManager.g.cs
index 0fe6e0a..061018e 100644
--- a/old/dotnet/tvos/generated-sources/Foundation/NSFileManager.g.cs
+++ b/new/dotnet/tvos/generated-sources/Foundation/NSFileManager.g.cs
@@ -985,6 +985,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1003,6 +1005,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1021,6 +1025,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
@@ -1057,6 +1063,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[SupportedOSPlatform ("macos11.0")]
[SupportedOSPlatform ("maccatalyst")]
diff --git a/new/dotnet/tvos/generated-sources/Foundation/NSFileProtectionType.g.cs b/new/dotnet/tvos/generated-sources/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..aabacf1
--- /dev/null
+++ b/new/dotnet/tvos/generated-sources/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,122 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.Versioning;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using UIKit;
+using GLKit;
+using Metal;
+using CoreML;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Security;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using ObjCRuntime;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using CoreAnimation;
+using CoreFoundation;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [SupportedOSPlatform ("macos11.0")]
+ [SupportedOSPlatform ("maccatalyst")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/ios/native/CoreSpotlight/CSSearchableIndex.g.cs b/new/ios/native/CoreSpotlight/CSSearchableIndex.g.cs
index d15a149..78360c8 100644
--- a/old/ios/native/CoreSpotlight/CSSearchableIndex.g.cs
+++ b/new/ios/native/CoreSpotlight/CSSearchableIndex.g.cs
@@ -110,6 +110,48 @@ namespace CoreSpotlight {
}
CFString.ReleaseNative (nsname);
}
+ [Export ("initWithName:protectionClass:bundleIdentifier:options:")]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSString? protectionClass, string bundleIdentifier, nint options)
+ : base (NSObjectFlag.Empty)
+ {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ if (name is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (name));
+ var protectionClass__handle__ = protectionClass.GetHandle ();
+ if (bundleIdentifier is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bundleIdentifier));
+ var nsname = CFString.CreateNative (name);
+ var nsbundleIdentifier = CFString.CreateNative (bundleIdentifier);
+ if (IsDirectBinding) {
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr (this.Handle, Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:"), nsname, protectionClass__handle__, nsbundleIdentifier, (IntPtr) options), "initWithName:protectionClass:bundleIdentifier:options:");
+ } else {
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr (this.SuperHandle, Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:"), nsname, protectionClass__handle__, nsbundleIdentifier, (IntPtr) options), "initWithName:protectionClass:bundleIdentifier:options:");
+ }
+ CFString.ReleaseNative (nsname);
+ CFString.ReleaseNative (nsbundleIdentifier);
+ #endif
+ }
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options)
+ : this (name, protectionClass.GetConstant (), bundleIdentifier, options)
+ {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ #endif
+ }
[Export ("deleteSearchableItemsWithIdentifiers:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void Delete (string[] identifiers, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V0))]global::System.Action<NSError>? completionHandler)
diff --git a/old/ios/native/CoreSpotlight/CSSuggestion.g.cs b/new/ios/native/CoreSpotlight/CSSuggestion.g.cs
index aa87c9b..27ad891 100644
--- a/old/ios/native/CoreSpotlight/CSSuggestion.g.cs
+++ b/new/ios/native/CoreSpotlight/CSSuggestion.g.cs
@@ -171,6 +171,56 @@ namespace CoreSpotlight {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ public virtual NSNumber Score {
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [Export ("score")]
+ get {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ NSNumber? ret;
+ if (IsDirectBinding) {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, Selector.GetHandle ("score")))!;
+ } else {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("score")))!;
+ }
+ return ret!;
+ #endif
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ public virtual NSObject[] SuggestionDataSources {
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [Export ("suggestionDataSources")]
+ get {
+ #if ARCH_32
+ throw new PlatformNotSupportedException ("This API is not supported on this version of iOS");
+ #else
+ NSObject[]? ret;
+ if (IsDirectBinding) {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, Selector.GetHandle ("suggestionDataSources")))!;
+ } else {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("suggestionDataSources")))!;
+ }
+ return ret!;
+ #endif
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual CSSuggestionKind SuggestionKind {
[Export ("suggestionKind")]
get {
diff --git a/old/ios/native/Foundation/NSFileManager.g.cs b/new/ios/native/Foundation/NSFileManager.g.cs
index 0122e22..4f944fa 100644
--- a/old/ios/native/Foundation/NSFileManager.g.cs
+++ b/new/ios/native/Foundation/NSFileManager.g.cs
@@ -1035,6 +1035,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionComplete {
@@ -1047,6 +1049,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUnlessOpen {
@@ -1059,6 +1063,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUntilFirstUserAuthentication {
@@ -1083,6 +1089,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionNone {
diff --git a/new/ios/native/Foundation/NSFileProtectionType.g.cs b/new/ios/native/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..4e4678d
--- /dev/null
+++ b/new/ios/native/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,124 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using UIKit;
+using GLKit;
+using Metal;
+using CoreML;
+using MapKit;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Contacts;
+using Security;
+using Messages;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using QuickLook;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using CoreMotion;
+using ObjCRuntime;
+using AddressBook;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using NewsstandKit;
+using FileProvider;
+using CoreAnimation;
+using CoreFoundation;
+using NetworkExtension;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/mac/full/CoreSpotlight/CSSearchableIndex.g.cs b/new/mac/full/CoreSpotlight/CSSearchableIndex.g.cs
index 6e2d9c8..4c446c5 100644
--- a/old/mac/full/CoreSpotlight/CSSearchableIndex.g.cs
+++ b/new/mac/full/CoreSpotlight/CSSearchableIndex.g.cs
@@ -71,6 +71,9 @@ namespace CoreSpotlight {
const string selInitWithName_X = "initWithName:";
static readonly IntPtr selInitWithName_XHandle = Selector.GetHandle ("initWithName:");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selInitWithName_ProtectionClass_BundleIdentifier_Options_X = "initWithName:protectionClass:bundleIdentifier:options:";
+ static readonly IntPtr selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle = Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
const string selIsIndexingAvailableX = "isIndexingAvailable";
static readonly IntPtr selIsIndexingAvailableXHandle = Selector.GetHandle ("isIndexingAvailable");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
@@ -121,6 +124,40 @@ namespace CoreSpotlight {
}
CFString.ReleaseNative (nsname);
}
+ [Export ("initWithName:protectionClass:bundleIdentifier:options:")]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSString? protectionClass, string bundleIdentifier, nint options)
+ : base (NSObjectFlag.Empty)
+ {
+ if (name is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (name));
+ var protectionClass__handle__ = protectionClass.GetHandle ();
+ if (bundleIdentifier is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bundleIdentifier));
+ var nsname = CFString.CreateNative (name);
+ var nsbundleIdentifier = CFString.CreateNative (bundleIdentifier);
+ if (IsDirectBinding) {
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr (this.Handle, selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle, nsname, protectionClass__handle__, nsbundleIdentifier, (IntPtr) options), "initWithName:protectionClass:bundleIdentifier:options:");
+ } else {
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr (this.SuperHandle, selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle, nsname, protectionClass__handle__, nsbundleIdentifier, (IntPtr) options), "initWithName:protectionClass:bundleIdentifier:options:");
+ }
+ CFString.ReleaseNative (nsname);
+ CFString.ReleaseNative (nsbundleIdentifier);
+ }
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options)
+ : this (name, protectionClass.GetConstant (), bundleIdentifier, options)
+ {
+ }
[Export ("deleteSearchableItemsWithIdentifiers:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void Delete (string[] identifiers, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V16))]global::System.Action<NSError>? completionHandler)
diff --git a/old/mac/full/CoreSpotlight/CSSuggestion.g.cs b/new/mac/full/CoreSpotlight/CSSuggestion.g.cs
index 67a0505..6cb633b 100644
--- a/old/mac/full/CoreSpotlight/CSSuggestion.g.cs
+++ b/new/mac/full/CoreSpotlight/CSSuggestion.g.cs
@@ -68,6 +68,12 @@ namespace CoreSpotlight {
const string selLocalizedAttributedSuggestionX = "localizedAttributedSuggestion";
static readonly IntPtr selLocalizedAttributedSuggestionXHandle = Selector.GetHandle ("localizedAttributedSuggestion");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selScoreX = "score";
+ static readonly IntPtr selScoreXHandle = Selector.GetHandle ("score");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selSuggestionDataSourcesX = "suggestionDataSources";
+ static readonly IntPtr selSuggestionDataSourcesXHandle = Selector.GetHandle ("suggestionDataSources");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
const string selSuggestionKindX = "suggestionKind";
static readonly IntPtr selSuggestionKindXHandle = Selector.GetHandle ("suggestionKind");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
@@ -165,6 +171,48 @@ namespace CoreSpotlight {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ public virtual NSNumber Score {
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [Export ("score")]
+ get {
+ NSNumber? ret;
+ if (IsDirectBinding) {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, selScoreXHandle))!;
+ } else {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, selScoreXHandle))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ public virtual NSObject[] SuggestionDataSources {
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [Export ("suggestionDataSources")]
+ get {
+ NSObject[]? ret;
+ if (IsDirectBinding) {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, selSuggestionDataSourcesXHandle))!;
+ } else {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, selSuggestionDataSourcesXHandle))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual CSSuggestionKind SuggestionKind {
[Export ("suggestionKind")]
get {
diff --git a/old/mac/full/Foundation/NSFileManager.g.cs b/new/mac/full/Foundation/NSFileManager.g.cs
index 6b7445c..858b878 100644
--- a/old/mac/full/Foundation/NSFileManager.g.cs
+++ b/new/mac/full/Foundation/NSFileManager.g.cs
@@ -1244,6 +1244,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionComplete {
@@ -1256,6 +1258,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUnlessOpen {
@@ -1268,6 +1272,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUntilFirstUserAuthentication {
@@ -1292,6 +1298,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionNone {
diff --git a/new/mac/full/Foundation/NSFileProtectionType.g.cs b/new/mac/full/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..90d83e9
--- /dev/null
+++ b/new/mac/full/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,119 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using QTKit;
+using Metal;
+using CoreML;
+using OpenGL;
+using AppKit;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Contacts;
+using Security;
+using CloudKit;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using ObjCRuntime;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using FileProvider;
+using CoreAnimation;
+using CoreFoundation;
+using NetworkExtension;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/mac/mobile/CoreSpotlight/CSSearchableIndex.g.cs b/new/mac/mobile/CoreSpotlight/CSSearchableIndex.g.cs
index 6e2d9c8..4c446c5 100644
--- a/old/mac/mobile/CoreSpotlight/CSSearchableIndex.g.cs
+++ b/new/mac/mobile/CoreSpotlight/CSSearchableIndex.g.cs
@@ -71,6 +71,9 @@ namespace CoreSpotlight {
const string selInitWithName_X = "initWithName:";
static readonly IntPtr selInitWithName_XHandle = Selector.GetHandle ("initWithName:");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selInitWithName_ProtectionClass_BundleIdentifier_Options_X = "initWithName:protectionClass:bundleIdentifier:options:";
+ static readonly IntPtr selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle = Selector.GetHandle ("initWithName:protectionClass:bundleIdentifier:options:");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
const string selIsIndexingAvailableX = "isIndexingAvailable";
static readonly IntPtr selIsIndexingAvailableXHandle = Selector.GetHandle ("isIndexingAvailable");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
@@ -121,6 +124,40 @@ namespace CoreSpotlight {
}
CFString.ReleaseNative (nsname);
}
+ [Export ("initWithName:protectionClass:bundleIdentifier:options:")]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSString? protectionClass, string bundleIdentifier, nint options)
+ : base (NSObjectFlag.Empty)
+ {
+ if (name is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (name));
+ var protectionClass__handle__ = protectionClass.GetHandle ();
+ if (bundleIdentifier is null)
+ ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (bundleIdentifier));
+ var nsname = CFString.CreateNative (name);
+ var nsbundleIdentifier = CFString.CreateNative (bundleIdentifier);
+ if (IsDirectBinding) {
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr_IntPtr_IntPtr (this.Handle, selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle, nsname, protectionClass__handle__, nsbundleIdentifier, (IntPtr) options), "initWithName:protectionClass:bundleIdentifier:options:");
+ } else {
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_IntPtr_IntPtr_IntPtr_IntPtr (this.SuperHandle, selInitWithName_ProtectionClass_BundleIdentifier_Options_XHandle, nsname, protectionClass__handle__, nsbundleIdentifier, (IntPtr) options), "initWithName:protectionClass:bundleIdentifier:options:");
+ }
+ CFString.ReleaseNative (nsname);
+ CFString.ReleaseNative (nsbundleIdentifier);
+ }
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public CSSearchableIndex (string name, NSFileProtectionType protectionClass, string bundleIdentifier, nint options)
+ : this (name, protectionClass.GetConstant (), bundleIdentifier, options)
+ {
+ }
[Export ("deleteSearchableItemsWithIdentifiers:completionHandler:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public unsafe virtual void Delete (string[] identifiers, [BlockProxy (typeof (ObjCRuntime.Trampolines.NIDActionArity1V16))]global::System.Action<NSError>? completionHandler)
diff --git a/old/mac/mobile/CoreSpotlight/CSSuggestion.g.cs b/new/mac/mobile/CoreSpotlight/CSSuggestion.g.cs
index 67a0505..6cb633b 100644
--- a/old/mac/mobile/CoreSpotlight/CSSuggestion.g.cs
+++ b/new/mac/mobile/CoreSpotlight/CSSuggestion.g.cs
@@ -68,6 +68,12 @@ namespace CoreSpotlight {
const string selLocalizedAttributedSuggestionX = "localizedAttributedSuggestion";
static readonly IntPtr selLocalizedAttributedSuggestionXHandle = Selector.GetHandle ("localizedAttributedSuggestion");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selScoreX = "score";
+ static readonly IntPtr selScoreXHandle = Selector.GetHandle ("score");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ const string selSuggestionDataSourcesX = "suggestionDataSources";
+ static readonly IntPtr selSuggestionDataSourcesXHandle = Selector.GetHandle ("suggestionDataSources");
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
const string selSuggestionKindX = "suggestionKind";
static readonly IntPtr selSuggestionKindXHandle = Selector.GetHandle ("suggestionKind");
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
@@ -165,6 +171,48 @@ namespace CoreSpotlight {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ public virtual NSNumber Score {
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [Export ("score")]
+ get {
+ NSNumber? ret;
+ if (IsDirectBinding) {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, selScoreXHandle))!;
+ } else {
+ ret = Runtime.GetNSObject<NSNumber> (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, selScoreXHandle))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ public virtual NSObject[] SuggestionDataSources {
+ [Introduced (PlatformName.iOS, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacCatalyst, 17,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Introduced (PlatformName.MacOSX, 14,0, ObjCRuntime.PlatformArchitecture.All)]
+ [Unavailable (PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All)]
+ [Export ("suggestionDataSources")]
+ get {
+ NSObject[]? ret;
+ if (IsDirectBinding) {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, selSuggestionDataSourcesXHandle))!;
+ } else {
+ ret = CFArray.ArrayFromHandle<NSObject>(global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, selSuggestionDataSourcesXHandle))!;
+ }
+ return ret!;
+ }
+ }
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
public virtual CSSuggestionKind SuggestionKind {
[Export ("suggestionKind")]
get {
diff --git a/old/mac/mobile/Foundation/NSFileManager.g.cs b/new/mac/mobile/Foundation/NSFileManager.g.cs
index 6b7445c..858b878 100644
--- a/old/mac/mobile/Foundation/NSFileManager.g.cs
+++ b/new/mac/mobile/Foundation/NSFileManager.g.cs
@@ -1244,6 +1244,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionComplete {
@@ -1256,6 +1258,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUnlessOpen {
@@ -1268,6 +1272,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUntilFirstUserAuthentication {
@@ -1292,6 +1298,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionNone {
diff --git a/new/mac/mobile/Foundation/NSFileProtectionType.g.cs b/new/mac/mobile/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..90d83e9
--- /dev/null
+++ b/new/mac/mobile/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,119 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using QTKit;
+using Metal;
+using CoreML;
+using OpenGL;
+using AppKit;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Contacts;
+using Security;
+using CloudKit;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using ObjCRuntime;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using FileProvider;
+using CoreAnimation;
+using CoreFoundation;
+using NetworkExtension;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/tvos/tvos/Foundation/NSFileManager.g.cs b/new/tvos/tvos/Foundation/NSFileManager.g.cs
index 6f92823..9830d7f 100644
--- a/old/tvos/tvos/Foundation/NSFileManager.g.cs
+++ b/new/tvos/tvos/Foundation/NSFileManager.g.cs
@@ -976,6 +976,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionComplete {
@@ -988,6 +990,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUnlessOpen {
@@ -1000,6 +1004,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUntilFirstUserAuthentication {
@@ -1024,6 +1030,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionNone {
diff --git a/new/tvos/tvos/Foundation/NSFileProtectionType.g.cs b/new/tvos/tvos/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..f472b91
--- /dev/null
+++ b/new/tvos/tvos/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,115 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using UIKit;
+using GLKit;
+using Metal;
+using CoreML;
+using Photos;
+using ModelIO;
+using Network;
+using SceneKit;
+using Security;
+using AudioUnit;
+using CoreVideo;
+using CoreMedia;
+using CoreImage;
+using SpriteKit;
+using Foundation;
+using ObjCRuntime;
+using MediaPlayer;
+using GameplayKit;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using CoreAnimation;
+using CoreFoundation;
+using MetalPerformanceShadersGraph;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
diff --git a/old/watch/watch/Foundation/NSFileManager.g.cs b/new/watch/watch/Foundation/NSFileManager.g.cs
index 13fd90a..fa10aab 100644
--- a/old/watch/watch/Foundation/NSFileManager.g.cs
+++ b/new/watch/watch/Foundation/NSFileManager.g.cs
@@ -967,6 +967,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionComplete;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionComplete", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionComplete {
@@ -979,6 +981,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUnlessOpen;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUnlessOpen {
@@ -991,6 +995,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionCompleteUntilFirstUserAuthentication;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionCompleteUntilFirstUserAuthentication {
@@ -1015,6 +1021,8 @@ namespace Foundation {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
static NSString? _FileProtectionNone;
+ [Obsolete ("Use the 'NSFileProtectionType' instead.", false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
[Field ("NSFileProtectionNone", "Foundation")]
[Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
public static NSString FileProtectionNone {
diff --git a/new/watch/watch/Foundation/NSFileProtectionType.g.cs b/new/watch/watch/Foundation/NSFileProtectionType.g.cs
new file mode 100644
index 0000000..4d7bd52
--- /dev/null
+++ b/new/watch/watch/Foundation/NSFileProtectionType.g.cs
@@ -0,0 +1,106 @@
+//
+// Auto-generated from generator.cs, do not edit
+//
+// We keep references to objects, so warning 414 is expected
+#pragma warning disable 414
+using System;
+using System.Drawing;
+using System.Diagnostics;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+using System.Diagnostics.CodeAnalysis;
+using UIKit;
+using CoreML;
+using Network;
+using SceneKit;
+using Contacts;
+using CoreVideo;
+using CoreMedia;
+using SpriteKit;
+using Foundation;
+using ObjCRuntime;
+using MediaPlayer;
+using CoreGraphics;
+using CoreLocation;
+using AVFoundation;
+using CoreFoundation;
+#nullable enable
+#if !NET
+using NativeHandle = System.IntPtr;
+#endif
+namespace Foundation {
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ public enum NSFileProtectionType : int {
+ Complete = 0,
+ CompleteUnlessOpen = 1,
+ CompleteUntilFirstUserAuthentication = 2,
+ None = 3,
+ }
+ [Introduced (PlatformName.MacOSX, 11,0, ObjCRuntime.PlatformArchitecture.All)]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static public partial class NSFileProtectionTypeExtensions {
+ static IntPtr[] values = new IntPtr [4];
+ [Field ("NSFileProtectionComplete", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionComplete {
+ get {
+ fixed (IntPtr *storage = &values [0])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionComplete", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUnlessOpen", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUnlessOpen {
+ get {
+ fixed (IntPtr *storage = &values [1])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUnlessOpen", storage);
+ }
+ }
+ [Field ("NSFileProtectionCompleteUntilFirstUserAuthentication", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionCompleteUntilFirstUserAuthentication {
+ get {
+ fixed (IntPtr *storage = &values [2])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionCompleteUntilFirstUserAuthentication", storage);
+ }
+ }
+ [Field ("NSFileProtectionNone", "Foundation")]
+ internal unsafe static IntPtr NSFileProtectionNone {
+ get {
+ fixed (IntPtr *storage = &values [3])
+ return Dlfcn.CachePointer (Libraries.Foundation.Handle, "NSFileProtectionNone", storage);
+ }
+ }
+ public static NSString? GetConstant (this NSFileProtectionType self)
+ {
+ IntPtr ptr = IntPtr.Zero;
+ switch ((int) self) {
+ case 0: // NSFileProtectionType.Complete
+ ptr = NSFileProtectionComplete;
+ break;
+ case 1: // NSFileProtectionType.CompleteUnlessOpen
+ ptr = NSFileProtectionCompleteUnlessOpen;
+ break;
+ case 2: // NSFileProtectionType.CompleteUntilFirstUserAuthentication
+ ptr = NSFileProtectionCompleteUntilFirstUserAuthentication;
+ break;
+ case 3: // NSFileProtectionType.None
+ ptr = NSFileProtectionNone;
+ break;
+ }
+ return (NSString?) Runtime.GetNSObject (ptr);
+ }
+ public static NSFileProtectionType GetValue (NSString constant)
+ {
+ if (constant is null)
+ throw new ArgumentNullException (nameof (constant));
+ if (constant.IsEqualTo (NSFileProtectionComplete))
+ return NSFileProtectionType.Complete;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUnlessOpen))
+ return NSFileProtectionType.CompleteUnlessOpen;
+ if (constant.IsEqualTo (NSFileProtectionCompleteUntilFirstUserAuthentication))
+ return NSFileProtectionType.CompleteUntilFirstUserAuthentication;
+ if (constant.IsEqualTo (NSFileProtectionNone))
+ return NSFileProtectionType.None;
+ throw new NotSupportedException ($"{constant} has no associated enum value on this platform.");
+ }
+ }
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment