diff --git a/src/ObjCBindings/ExportTag.cs b/src/ObjCBindings/ExportTag.cs
index 9ee01343ac0..f1e76d87397 100644
--- a/src/ObjCBindings/ExportTag.cs
+++ b/src/ObjCBindings/ExportTag.cs
@@ -122,7 +122,7 @@ public enum Property : Int64 {
///
/// The backing field for a property to be annotated with the .NET [ThreadStatic] attribute.
///
- IsThreadStaticAttribute = 1 << 2,
+ IsThreadStatic = 1 << 2,
///
/// Generate a notification for the property.
diff --git a/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs b/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs
index 90854938ec7..c01606a0e08 100644
--- a/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs
+++ b/src/rgen/Microsoft.Macios.Generator/Attributes/ExportData.cs
@@ -98,7 +98,7 @@ public static bool TryParse (AttributeData attributeData,
// there are two possible cases in this situation.
// 1. The second argument is an ArgumentSemantic
// 2. The second argument is a T
- if (attributeData.ConstructorArguments [1].Value is ArgumentSemantic) {
+ if (attributeData.ConstructorArguments [1].Type?.Name == nameof (ObjCRuntime.ArgumentSemantic)) {
selector = (string?) attributeData.ConstructorArguments [0].Value!;
argumentSemantic = (ArgumentSemantic) attributeData.ConstructorArguments [1].Value!;
} else {
diff --git a/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs b/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs
index 8e287d1db36..632345c96f1 100644
--- a/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs
+++ b/src/rgen/Microsoft.Macios.Generator/Emitters/ClassEmitter.cs
@@ -142,6 +142,44 @@ void EmitFields (string className, in ImmutableArray properties, Tabbe
notificationProperties = notificationsBuilder.ToImmutable ();
}
+ void EmitProperties (in ImmutableArray properties, TabbedWriter classBlock)
+ {
+
+ foreach (var property in properties.OrderBy (p => p.Name)) {
+ if (property.IsField)
+ // ignore fields
+ continue;
+
+ // we expect to always at least have a getter
+ var getter = property.GetAccessor (AccessorKind.Getter);
+ if (getter is null)
+ continue;
+
+ classBlock.WriteLine ();
+ classBlock.AppendMemberAvailability (property.SymbolAvailability);
+ classBlock.AppendGeneratedCodeAttribute (optimizable: true);
+
+ using (var propertyBlock = classBlock.CreateBlock (property.ToDeclaration ().ToString (), block: true)) {
+ // be very verbose with the availability, makes the life easier to the dotnet analyzer
+ propertyBlock.AppendMemberAvailability (getter.Value.SymbolAvailability);
+ using (var getterBlock = propertyBlock.CreateBlock ("get", block: true)) {
+ getterBlock.WriteLine ("throw new NotImplementedException();");
+ }
+
+ var setter = property.GetAccessor (AccessorKind.Setter);
+ if (setter is null)
+ // we are done with the current property
+ continue;
+
+ propertyBlock.WriteLine (); // add space between getter and setter since we have the attrs
+ propertyBlock.AppendMemberAvailability (setter.Value.SymbolAvailability);
+ using (var setterBlock = propertyBlock.CreateBlock ("set", block: true)) {
+ setterBlock.WriteLine ("throw new NotImplementedException();");
+ }
+ }
+ }
+ }
+
void EmitNotifications (in ImmutableArray properties, TabbedWriter classBlock)
{
// to be implemented, do not throw or tests will fail.
@@ -189,6 +227,7 @@ public bool TryEmit (in BindingContext bindingContext, [NotNullWhen (false)] out
EmitFields (bindingContext.Changes.Name, bindingContext.Changes.Properties, classBlock,
out var notificationProperties);
+ EmitProperties (bindingContext.Changes.Properties, classBlock);
// emit the notification helper classes, leave this for the very bottom of the class
EmitNotifications (notificationProperties, classBlock);
diff --git a/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.Generator.cs b/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.Generator.cs
index 5676dc0953a..f559dee6ac1 100644
--- a/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.Generator.cs
+++ b/src/rgen/Microsoft.Macios.Generator/Extensions/TypeSymbolExtensions.Generator.cs
@@ -219,7 +219,7 @@ public static bool IsWrapped (this ITypeSymbol symbol, bool isNSObject)
/// itself.
///
/// The symbol to check if it is wrapped.
- /// True if the ymbol is considered to be wrapped.
+ /// True if the symbol is considered to be wrapped.
public static bool IsWrapped (this ITypeSymbol symbol)
{
symbol.GetInheritance (
diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs
index eb37750437b..905cc0d7051 100644
--- a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs
+++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/ClassGenerationTests.cs
@@ -24,6 +24,10 @@ public class TestDataGenerator : BaseTestDataGenerator, IEnumerable {
(ApplePlatform.iOS, "CIImage", "CIImage.cs", "ExpectedCIImage.cs", null),
(ApplePlatform.TVOS, "CIImage", "CIImage.cs", "ExpectedCIImage.cs", null),
(ApplePlatform.MacCatalyst, "CIImage", "CIImage.cs", "ExpectedCIImage.cs", null),
+ (ApplePlatform.iOS, "PropertyTests", "PropertyTests.cs", "ExpectedPropertyTests.cs", null),
+ (ApplePlatform.TVOS, "PropertyTests", "PropertyTests.cs", "ExpectedPropertyTests.cs", null),
+ (ApplePlatform.MacCatalyst, "PropertyTests", "PropertyTests.cs", "ExpectedPropertyTests.cs", null),
+ (ApplePlatform.MacOSX, "PropertyTests", "PropertyTests.cs", "ExpectedPropertyTests.cs", null),
};
diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedPropertyTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedPropertyTests.cs
new file mode 100644
index 00000000000..cb43824b07a
--- /dev/null
+++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/ExpectedPropertyTests.cs
@@ -0,0 +1,400 @@
+//
+
+#nullable enable
+
+using CoreGraphics;
+using Foundation;
+using ObjCBindings;
+using ObjCRuntime;
+using System;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
+using System.Threading.Tasks;
+
+namespace TestNamespace;
+
+[Register ("PropertyTests", true)]
+public partial class PropertyTests
+{
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ static readonly NativeHandle class_ptr = Class.GetHandle ("PropertyTests");
+
+ public override NativeHandle ClassHandle => class_ptr;
+
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [DesignatedInitializer]
+ [Export ("init")]
+ public PropertyTests () : base (NSObjectFlag.Empty)
+ {
+ if (IsDirectBinding)
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, global::ObjCRuntime.Selector.GetHandle ("init")), "init");
+ else
+ InitializeHandle (global::ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, global::ObjCRuntime.Selector.GetHandle ("init")), "init");
+ }
+
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ protected PropertyTests (NSObjectFlag t) : base (t) {}
+
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ [EditorBrowsable (EditorBrowsableState.Advanced)]
+ protected internal PropertyTests (NativeHandle handle) : base (handle) {}
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public static partial Foundation.NSCharacterSet Alphanumerics
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial Foundation.NSAttributedString AttributedStringByInflectingString
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial bool CanDraw
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial bool ContainsAttachments
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial UIntPtr Count
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial bool ForPersonMassUse
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial bool IsLenient
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial nfloat LineSpacing
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ internal virtual partial Foundation.NSLocale Locale
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial string Name
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial string? Name
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial string[] Name
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial Foundation.NSMetadataItem[] Results
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial CoreGraphics.CGSize Size
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial nuint[] Sizes
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
+ public virtual partial Foundation.NSObject? WeakDelegate
+ {
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ get
+ {
+ throw new NotImplementedException();
+ }
+
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ set
+ {
+ throw new NotImplementedException();
+ }
+ }
+ // TODO: add binding code here
+}
diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/PropertyTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/PropertyTests.cs
new file mode 100644
index 00000000000..4709a216714
--- /dev/null
+++ b/tests/rgen/Microsoft.Macios.Generator.Tests/Classes/Data/PropertyTests.cs
@@ -0,0 +1,164 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+using System;
+using System.Runtime.Versioning;
+using CoreGraphics;
+using Foundation;
+using ObjCBindings;
+using ObjCRuntime;
+
+namespace TestNamespace;
+
+[BindingType]
+public partial class PropertyTests {
+
+ // the following are a list of examples of all possible property definitions
+
+ // simple value type
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("count")]
+ public virtual partial nuint Count { get; }
+
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("lineSpacing")]
+ public virtual partial nfloat LineSpacing { get; set; }
+
+ // array
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("sizes")]
+ public virtual partial nuint [] Sizes { get; }
+
+ // boolean
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("containsAttachments")]
+ public virtual partial bool ContainsAttachments { get; }
+
+ // simple string
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("name")]
+ public virtual partial string Name { get; set; }
+
+ // nullable string
+ [Export ("name")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ public virtual partial string? Name { get; set; }
+
+ // array of strings
+ [Export ("surnames")]
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ public virtual partial string [] Name { get; set; }
+
+ // simple NSObject
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("attributedStringByInflectingString")]
+ public virtual partial NSAttributedString AttributedStringByInflectingString { get; }
+
+ // nullable NSObject
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("delegate", ArgumentSemantic.Assign)]
+ public virtual partial NSObject? WeakDelegate { get; set; }
+
+ // array nsobject
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("results")]
+ public virtual partial NSMetadataItem [] Results { get; }
+
+ // struct
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("size")]
+ public virtual partial CGSize Size { get; }
+
+ // static property
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("alphanumericCharacterSet", ArgumentSemantic.Copy)]
+ public static partial NSCharacterSet Alphanumerics { get; }
+
+ // internal property
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("locale", ArgumentSemantic.Copy)]
+ internal virtual partial NSLocale Locale { get; set; }
+
+ // property with custom selector on getter
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("forPersonMassUse")]
+ public virtual partial bool ForPersonMassUse {
+ [Export ("isForPersonMassUse")]
+ get;
+ set;
+ }
+
+ // property with custom selector on setter
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [Export ("isLenient")]
+ public virtual partial bool IsLenient {
+ get;
+ [Export ("setLenient:")]
+ set;
+ }
+
+ // wrapper property example
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ public virtual INSMetadataQueryDelegate? Delegate {
+ get => WeakDelegate as INSMetadataQueryDelegate;
+ set => WeakDelegate = value;
+ }
+
+ // bindfrom
+ [SupportedOSPlatform ("ios")]
+ [SupportedOSPlatform ("tvos")]
+ [SupportedOSPlatform ("macos")]
+ [SupportedOSPlatform ("maccatalyst13.1")]
+ [BindFrom (typeof (NSNumber))]
+ [Export ("canDraw")]
+ public virtual partial bool CanDraw { get; set; }
+
+}