Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created April 24, 2023 09:57
Show Gist options
  • Save vs-mobiletools-engineering-service2/3d724a676f1da827ab7c4bace767c1ba to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/3d724a676f1da827ab7c4bace767c1ba to your computer and use it in GitHub Desktop.
generator-diff/generator.diff
diff --git a/old/dotnet/macos/generated-sources/AppKit/NSTextField.g.cs b/new/dotnet/macos/generated-sources/AppKit/NSTextField.g.cs
index 7b7b2e3..a3ede17 100644
--- a/old/dotnet/macos/generated-sources/AppKit/NSTextField.g.cs
+++ b/new/dotnet/macos/generated-sources/AppKit/NSTextField.g.cs
@@ -472,10 +472,10 @@ namespace AppKit {
}
[Export ("selectText:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual void SelectText (NSObject sender)
+ public virtual void SelectText (NSObject? sender)
{
global::AppKit.NSApplication.EnsureUIThread ();
- var sender__handle__ = sender!.GetNonNullHandle (nameof (sender));
+ var sender__handle__ = sender.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSelectText_Handle, sender__handle__);
} else {
@@ -704,7 +704,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor BackgroundColor {
+ public virtual NSColor? BackgroundColor {
[Export ("backgroundColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -719,7 +719,7 @@ namespace AppKit {
[Export ("setBackgroundColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetBackgroundColor_Handle, value__handle__);
} else {
@@ -933,7 +933,7 @@ namespace AppKit {
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("maccatalyst")]
- public virtual NSAttributedString PlaceholderAttributedString {
+ public virtual NSAttributedString? PlaceholderAttributedString {
[Export ("placeholderAttributedString", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -948,7 +948,7 @@ namespace AppKit {
[Export ("setPlaceholderAttributedString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetPlaceholderAttributedString_Handle, value__handle__);
} else {
@@ -959,7 +959,7 @@ namespace AppKit {
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[SupportedOSPlatform ("macos")]
[UnsupportedOSPlatform ("maccatalyst")]
- public virtual string PlaceholderString {
+ public virtual string? PlaceholderString {
[Export ("placeholderString", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -972,8 +972,6 @@ namespace AppKit {
[Export ("setPlaceholderString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
var nsvalue = CFString.CreateNative (value);
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetPlaceholderString_Handle, nsvalue);
@@ -1026,7 +1024,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor TextColor {
+ public virtual NSColor? TextColor {
[Export ("textColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -1041,7 +1039,7 @@ namespace AppKit {
[Export ("setTextColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetTextColor_Handle, value__handle__);
} else {
diff --git a/old/dotnet/macos/generated-sources/AppKit/NSTextFieldCell.g.cs b/new/dotnet/macos/generated-sources/AppKit/NSTextFieldCell.g.cs
index 3f6d056..873dfd1 100644
--- a/old/dotnet/macos/generated-sources/AppKit/NSTextFieldCell.g.cs
+++ b/new/dotnet/macos/generated-sources/AppKit/NSTextFieldCell.g.cs
@@ -190,7 +190,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual string[] AllowedInputSourceLocales {
+ public virtual string[]? AllowedInputSourceLocales {
[Export ("allowedInputSourceLocales")]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -203,19 +203,18 @@ namespace AppKit {
[Export ("setAllowedInputSourceLocales:")]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
- var nsa_value = NSArray.FromStrings (value);
+ var nsa_value = value is null ? null : NSArray.FromStrings (value);
if (IsDirectBinding) {
- global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetAllowedInputSourceLocales_Handle, nsa_value.Handle);
+ global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetAllowedInputSourceLocales_Handle, nsa_value.GetHandle ());
} else {
- global::ObjCRuntime.Messaging.void_objc_msgSendSuper_NativeHandle (this.SuperHandle, selSetAllowedInputSourceLocales_Handle, nsa_value.Handle);
+ global::ObjCRuntime.Messaging.void_objc_msgSendSuper_NativeHandle (this.SuperHandle, selSetAllowedInputSourceLocales_Handle, nsa_value.GetHandle ());
}
- nsa_value.Dispose ();
+ if (nsa_value != null)
+ nsa_value.Dispose ();
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor BackgroundColor {
+ public virtual NSColor? BackgroundColor {
[Export ("backgroundColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -230,7 +229,7 @@ namespace AppKit {
[Export ("setBackgroundColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetBackgroundColor_Handle, value__handle__);
} else {
@@ -283,7 +282,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSAttributedString PlaceholderAttributedString {
+ public virtual NSAttributedString? PlaceholderAttributedString {
[Export ("placeholderAttributedString", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -298,7 +297,7 @@ namespace AppKit {
[Export ("setPlaceholderAttributedString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetPlaceholderAttributedString_Handle, value__handle__);
} else {
@@ -307,7 +306,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual string PlaceholderString {
+ public virtual string? PlaceholderString {
[Export ("placeholderString")]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -320,8 +319,6 @@ namespace AppKit {
[Export ("setPlaceholderString:")]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
var nsvalue = CFString.CreateNative (value);
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetPlaceholderString_Handle, nsvalue);
@@ -332,7 +329,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor TextColor {
+ public virtual NSColor? TextColor {
[Export ("textColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -347,7 +344,7 @@ namespace AppKit {
[Export ("setTextColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle (this.Handle, selSetTextColor_Handle, value__handle__);
} else {
diff --git a/old/mac/full/AppKit/NSTextField.g.cs b/new/mac/full/AppKit/NSTextField.g.cs
index 7015fa1..b214e43 100644
--- a/old/mac/full/AppKit/NSTextField.g.cs
+++ b/new/mac/full/AppKit/NSTextField.g.cs
@@ -460,10 +460,10 @@ namespace AppKit {
}
[Export ("selectText:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual void SelectText (NSObject sender)
+ public virtual void SelectText (NSObject? sender)
{
global::AppKit.NSApplication.EnsureUIThread ();
- var sender__handle__ = sender!.GetNonNullHandle (nameof (sender));
+ var sender__handle__ = sender.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSelectText_Handle, sender__handle__);
} else {
@@ -665,7 +665,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor BackgroundColor {
+ public virtual NSColor? BackgroundColor {
[Export ("backgroundColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -680,7 +680,7 @@ namespace AppKit {
[Export ("setBackgroundColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetBackgroundColor_Handle, value__handle__);
} else {
@@ -892,7 +892,7 @@ namespace AppKit {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
- public virtual NSAttributedString PlaceholderAttributedString {
+ public virtual NSAttributedString? PlaceholderAttributedString {
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
[Export ("placeholderAttributedString", ArgumentSemantic.Copy)]
get {
@@ -909,7 +909,7 @@ namespace AppKit {
[Export ("setPlaceholderAttributedString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderAttributedString_Handle, value__handle__);
} else {
@@ -919,7 +919,7 @@ namespace AppKit {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
- public virtual string PlaceholderString {
+ public virtual string? PlaceholderString {
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
[Export ("placeholderString", ArgumentSemantic.Copy)]
get {
@@ -934,8 +934,6 @@ namespace AppKit {
[Export ("setPlaceholderString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
var nsvalue = CFString.CreateNative (value);
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderString_Handle, nsvalue);
@@ -988,7 +986,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor TextColor {
+ public virtual NSColor? TextColor {
[Export ("textColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -1003,7 +1001,7 @@ namespace AppKit {
[Export ("setTextColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetTextColor_Handle, value__handle__);
} else {
diff --git a/old/mac/full/AppKit/NSTextFieldCell.g.cs b/new/mac/full/AppKit/NSTextFieldCell.g.cs
index c35d95b..d91eb83 100644
--- a/old/mac/full/AppKit/NSTextFieldCell.g.cs
+++ b/new/mac/full/AppKit/NSTextFieldCell.g.cs
@@ -188,7 +188,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual string[] AllowedInputSourceLocales {
+ public virtual string[]? AllowedInputSourceLocales {
[Export ("allowedInputSourceLocales")]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -201,19 +201,18 @@ namespace AppKit {
[Export ("setAllowedInputSourceLocales:")]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
- var nsa_value = NSArray.FromStrings (value);
+ var nsa_value = value is null ? null : NSArray.FromStrings (value);
if (IsDirectBinding) {
- global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetAllowedInputSourceLocales_Handle, nsa_value.Handle);
+ global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetAllowedInputSourceLocales_Handle, nsa_value.GetHandle ());
} else {
- global::ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (this.SuperHandle, selSetAllowedInputSourceLocales_Handle, nsa_value.Handle);
+ global::ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (this.SuperHandle, selSetAllowedInputSourceLocales_Handle, nsa_value.GetHandle ());
}
- nsa_value.Dispose ();
+ if (nsa_value != null)
+ nsa_value.Dispose ();
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor BackgroundColor {
+ public virtual NSColor? BackgroundColor {
[Export ("backgroundColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -228,7 +227,7 @@ namespace AppKit {
[Export ("setBackgroundColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetBackgroundColor_Handle, value__handle__);
} else {
@@ -281,7 +280,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSAttributedString PlaceholderAttributedString {
+ public virtual NSAttributedString? PlaceholderAttributedString {
[Export ("placeholderAttributedString", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -296,7 +295,7 @@ namespace AppKit {
[Export ("setPlaceholderAttributedString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderAttributedString_Handle, value__handle__);
} else {
@@ -305,7 +304,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual string PlaceholderString {
+ public virtual string? PlaceholderString {
[Export ("placeholderString")]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -318,8 +317,6 @@ namespace AppKit {
[Export ("setPlaceholderString:")]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
var nsvalue = CFString.CreateNative (value);
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderString_Handle, nsvalue);
@@ -330,7 +327,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor TextColor {
+ public virtual NSColor? TextColor {
[Export ("textColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -345,7 +342,7 @@ namespace AppKit {
[Export ("setTextColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetTextColor_Handle, value__handle__);
} else {
diff --git a/old/mac/mobile/AppKit/NSTextField.g.cs b/new/mac/mobile/AppKit/NSTextField.g.cs
index 7015fa1..b214e43 100644
--- a/old/mac/mobile/AppKit/NSTextField.g.cs
+++ b/new/mac/mobile/AppKit/NSTextField.g.cs
@@ -460,10 +460,10 @@ namespace AppKit {
}
[Export ("selectText:")]
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual void SelectText (NSObject sender)
+ public virtual void SelectText (NSObject? sender)
{
global::AppKit.NSApplication.EnsureUIThread ();
- var sender__handle__ = sender!.GetNonNullHandle (nameof (sender));
+ var sender__handle__ = sender.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSelectText_Handle, sender__handle__);
} else {
@@ -665,7 +665,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor BackgroundColor {
+ public virtual NSColor? BackgroundColor {
[Export ("backgroundColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -680,7 +680,7 @@ namespace AppKit {
[Export ("setBackgroundColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetBackgroundColor_Handle, value__handle__);
} else {
@@ -892,7 +892,7 @@ namespace AppKit {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
- public virtual NSAttributedString PlaceholderAttributedString {
+ public virtual NSAttributedString? PlaceholderAttributedString {
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
[Export ("placeholderAttributedString", ArgumentSemantic.Copy)]
get {
@@ -909,7 +909,7 @@ namespace AppKit {
[Export ("setPlaceholderAttributedString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderAttributedString_Handle, value__handle__);
} else {
@@ -919,7 +919,7 @@ namespace AppKit {
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
- public virtual string PlaceholderString {
+ public virtual string? PlaceholderString {
[Introduced (PlatformName.MacOSX, 10,10, ObjCRuntime.PlatformArchitecture.All)]
[Export ("placeholderString", ArgumentSemantic.Copy)]
get {
@@ -934,8 +934,6 @@ namespace AppKit {
[Export ("setPlaceholderString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
var nsvalue = CFString.CreateNative (value);
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderString_Handle, nsvalue);
@@ -988,7 +986,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor TextColor {
+ public virtual NSColor? TextColor {
[Export ("textColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -1003,7 +1001,7 @@ namespace AppKit {
[Export ("setTextColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetTextColor_Handle, value__handle__);
} else {
diff --git a/old/mac/mobile/AppKit/NSTextFieldCell.g.cs b/new/mac/mobile/AppKit/NSTextFieldCell.g.cs
index c35d95b..d91eb83 100644
--- a/old/mac/mobile/AppKit/NSTextFieldCell.g.cs
+++ b/new/mac/mobile/AppKit/NSTextFieldCell.g.cs
@@ -188,7 +188,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual string[] AllowedInputSourceLocales {
+ public virtual string[]? AllowedInputSourceLocales {
[Export ("allowedInputSourceLocales")]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -201,19 +201,18 @@ namespace AppKit {
[Export ("setAllowedInputSourceLocales:")]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
- var nsa_value = NSArray.FromStrings (value);
+ var nsa_value = value is null ? null : NSArray.FromStrings (value);
if (IsDirectBinding) {
- global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetAllowedInputSourceLocales_Handle, nsa_value.Handle);
+ global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetAllowedInputSourceLocales_Handle, nsa_value.GetHandle ());
} else {
- global::ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (this.SuperHandle, selSetAllowedInputSourceLocales_Handle, nsa_value.Handle);
+ global::ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (this.SuperHandle, selSetAllowedInputSourceLocales_Handle, nsa_value.GetHandle ());
}
- nsa_value.Dispose ();
+ if (nsa_value != null)
+ nsa_value.Dispose ();
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor BackgroundColor {
+ public virtual NSColor? BackgroundColor {
[Export ("backgroundColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -228,7 +227,7 @@ namespace AppKit {
[Export ("setBackgroundColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetBackgroundColor_Handle, value__handle__);
} else {
@@ -281,7 +280,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSAttributedString PlaceholderAttributedString {
+ public virtual NSAttributedString? PlaceholderAttributedString {
[Export ("placeholderAttributedString", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -296,7 +295,7 @@ namespace AppKit {
[Export ("setPlaceholderAttributedString:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderAttributedString_Handle, value__handle__);
} else {
@@ -305,7 +304,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual string PlaceholderString {
+ public virtual string? PlaceholderString {
[Export ("placeholderString")]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -318,8 +317,6 @@ namespace AppKit {
[Export ("setPlaceholderString:")]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- if (value is null)
- ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (value));
var nsvalue = CFString.CreateNative (value);
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetPlaceholderString_Handle, nsvalue);
@@ -330,7 +327,7 @@ namespace AppKit {
}
}
[BindingImpl (BindingImplOptions.GeneratedCode | BindingImplOptions.Optimizable)]
- public virtual NSColor TextColor {
+ public virtual NSColor? TextColor {
[Export ("textColor", ArgumentSemantic.Copy)]
get {
global::AppKit.NSApplication.EnsureUIThread ();
@@ -345,7 +342,7 @@ namespace AppKit {
[Export ("setTextColor:", ArgumentSemantic.Copy)]
set {
global::AppKit.NSApplication.EnsureUIThread ();
- var value__handle__ = value!.GetNonNullHandle (nameof (value));
+ var value__handle__ = value.GetHandle ();
if (IsDirectBinding) {
global::ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, selSetTextColor_Handle, value__handle__);
} else {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment