From 874561ce83189487413fafb5701abf0d50d26100 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Sun, 1 Feb 2026 17:23:12 +0100 Subject: [PATCH 1/5] Mark Color as immutable and make Font a readonly struct - Add [ImmutableObject(true)] attribute to Color class to document its immutability - Convert Font from struct to readonly struct - Change Font properties from { get; private set; } to { get; } --- src/Graphics/src/Graphics/Color.cs | 1 + src/Graphics/src/Graphics/Font.cs | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Graphics/src/Graphics/Color.cs b/src/Graphics/src/Graphics/Color.cs index 7a0320334f80..81605819fe43 100644 --- a/src/Graphics/src/Graphics/Color.cs +++ b/src/Graphics/src/Graphics/Color.cs @@ -12,6 +12,7 @@ namespace Microsoft.Maui.Graphics /// [DebuggerDisplay("Red={Red}, Green={Green}, Blue={Blue}, Alpha={Alpha}")] [TypeConverter(typeof(Converters.ColorTypeConverter))] + [ImmutableObject(true)] public class Color { /// diff --git a/src/Graphics/src/Graphics/Font.cs b/src/Graphics/src/Graphics/Font.cs index 6e551b77e0ed..427aab4f62d5 100644 --- a/src/Graphics/src/Graphics/Font.cs +++ b/src/Graphics/src/Graphics/Font.cs @@ -101,7 +101,7 @@ public static class FontWeights /// /// Represents a font with a name, weight, and style. /// - public struct Font : IFont, IEquatable + public readonly struct Font : IFont, IEquatable { /// /// Gets the default font. @@ -131,17 +131,17 @@ public Font(string name, int weight = FontWeights.Normal, FontStyleType styleTyp /// /// Gets the font name or family. /// - public string Name { get; private set; } + public string Name { get; } /// /// Gets the font weight. /// - public int Weight { get; private set; } + public int Weight { get; } /// /// Gets the font style type. /// - public FontStyleType StyleType { get; private set; } + public FontStyleType StyleType { get; } /// /// Determines whether the specified font is equal to the current font. From 099a6c978bd5080b5c9dfb30a1aefbcb6082d2fa Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Mon, 9 Feb 2026 09:46:38 +0100 Subject: [PATCH 2/5] Convert Color to record class with int-comparison equality - Change Color from class to record class for IEquatable support - Add explicit Equals(Color) using ToInt() to preserve byte-precision semantics - All equality paths (==, !=, Equals) use consistent int comparison - Add PublicAPI.Unshipped.txt entries for compiler-generated record members --- src/Graphics/src/Graphics/Color.cs | 13 ++++++++----- .../PublicAPI/net-android/PublicAPI.Unshipped.txt | 8 ++++++++ .../PublicAPI/net-ios/PublicAPI.Unshipped.txt | 8 ++++++++ .../net-maccatalyst/PublicAPI.Unshipped.txt | 8 ++++++++ .../PublicAPI/net-macos/PublicAPI.Unshipped.txt | 8 ++++++++ .../PublicAPI/net-tizen/PublicAPI.Unshipped.txt | 8 ++++++++ .../PublicAPI/net-windows/PublicAPI.Unshipped.txt | 8 ++++++++ .../Graphics/PublicAPI/net/PublicAPI.Unshipped.txt | 8 ++++++++ .../PublicAPI/netstandard/PublicAPI.Unshipped.txt | 8 ++++++++ 9 files changed, 72 insertions(+), 5 deletions(-) diff --git a/src/Graphics/src/Graphics/Color.cs b/src/Graphics/src/Graphics/Color.cs index 81605819fe43..185ee871830e 100644 --- a/src/Graphics/src/Graphics/Color.cs +++ b/src/Graphics/src/Graphics/Color.cs @@ -13,7 +13,7 @@ namespace Microsoft.Maui.Graphics [DebuggerDisplay("Red={Red}, Green={Green}, Blue={Blue}, Alpha={Alpha}")] [TypeConverter(typeof(Converters.ColorTypeConverter))] [ImmutableObject(true)] - public class Color + public record class Color { /// /// The red component of the color, ranging from 0.0 to 1.0. @@ -125,12 +125,15 @@ public override int GetHashCode() } } - public override bool Equals(object obj) + /// + /// Determines whether the specified is equal to the current color using byte-precision comparison. + /// + public virtual bool Equals(Color other) { - if (obj is Color other) - return ToInt() == other.ToInt(); + if (other is null) + return false; - return base.Equals(obj); + return ToInt() == other.ToInt(); } [Obsolete("Use ToArgbHex instead.")] diff --git a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 7dc5c58110bf..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -1 +1,9 @@ #nullable enable +Microsoft.Maui.Graphics.Color.Color(Microsoft.Maui.Graphics.Color! original) -> void +override Microsoft.Maui.Graphics.Color.Equals(object? obj) -> bool +static Microsoft.Maui.Graphics.Color.operator !=(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? left, Microsoft.Maui.Graphics.Color? right) -> bool +virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! +virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! +virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool From ec6c23c36be99f007bf15cffefa766c24804535e Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Mon, 9 Feb 2026 12:06:00 +0100 Subject: [PATCH 3/5] Remove 'virtual' from Color.Equals(Color) --- src/Graphics/src/Graphics/Color.cs | 2 +- .../src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 2 +- .../Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt | 2 +- src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Graphics/src/Graphics/Color.cs b/src/Graphics/src/Graphics/Color.cs index 185ee871830e..a0bf9c258ada 100644 --- a/src/Graphics/src/Graphics/Color.cs +++ b/src/Graphics/src/Graphics/Color.cs @@ -128,7 +128,7 @@ public override int GetHashCode() /// /// Determines whether the specified is equal to the current color using byte-precision comparison. /// - public virtual bool Equals(Color other) + public bool Equals(Color other) { if (other is null) return false; diff --git a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 4460e5759c58..38be09948727 100644 --- a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool From 6f2cb9903ab94873ae6b51a50b42aaf696b39089 Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Wed, 11 Feb 2026 09:54:03 +0100 Subject: [PATCH 4/5] Restore virtual on Color.Equals(Color) - required for non-sealed record class CS8872: 'Color.Equals(Color)' must allow overriding because the containing record is not sealed. The virtual modifier is mandatory for record class types. --- src/Graphics/src/Graphics/Color.cs | 2 +- .../src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt | 2 +- .../Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt | 2 +- src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt | 2 +- .../src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Graphics/src/Graphics/Color.cs b/src/Graphics/src/Graphics/Color.cs index a0bf9c258ada..185ee871830e 100644 --- a/src/Graphics/src/Graphics/Color.cs +++ b/src/Graphics/src/Graphics/Color.cs @@ -128,7 +128,7 @@ public override int GetHashCode() /// /// Determines whether the specified is equal to the current color using byte-precision comparison. /// - public bool Equals(Color other) + public virtual bool Equals(Color other) { if (other is null) return false; diff --git a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 38be09948727..4460e5759c58 100644 --- a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool From f6643c9cad6eb9340b58e2d733b56cc9d7137afa Mon Sep 17 00:00:00 2001 From: Stephane Delcroix Date: Fri, 27 Feb 2026 11:49:30 +0100 Subject: [PATCH 5/5] Fix GetHashCode/Equals contract and add EqualityContract check for Color record - GetHashCode() now returns ToInt() to be consistent with Equals(Color? other), which also uses ToInt() for byte-precision comparison. Previously GetHashCode() hashed raw float values while Equals() quantized to bytes, violating the contract (two equal Colors could have different hash codes). - Equals(Color? other) now checks EqualityContract to properly distinguish Color from derived record types, matching standard record equality semantics. - Parameter type changed from Color to Color? to match the record-generated Equals pattern and allow proper null handling. - Updated PublicAPI.Unshipped.txt for all TFMs to reflect the nullable parameter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/Graphics/src/Graphics/Color.cs | 17 +++++------------ .../net-android/PublicAPI.Unshipped.txt | 2 +- .../PublicAPI/net-ios/PublicAPI.Unshipped.txt | 2 +- .../net-maccatalyst/PublicAPI.Unshipped.txt | 2 +- .../PublicAPI/net-macos/PublicAPI.Unshipped.txt | 2 +- .../PublicAPI/net-tizen/PublicAPI.Unshipped.txt | 2 +- .../net-windows/PublicAPI.Unshipped.txt | 2 +- .../PublicAPI/net/PublicAPI.Unshipped.txt | 2 +- .../netstandard/PublicAPI.Unshipped.txt | 2 +- 9 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/Graphics/src/Graphics/Color.cs b/src/Graphics/src/Graphics/Color.cs index 185ee871830e..400eb371d248 100644 --- a/src/Graphics/src/Graphics/Color.cs +++ b/src/Graphics/src/Graphics/Color.cs @@ -113,26 +113,19 @@ public override string ToString() return $"[Color: Red={r}, Green={g}, Blue={b}, Alpha={a}]"; } - public override int GetHashCode() - { - unchecked - { - int hashcode = Red.GetHashCode(); - hashcode = (hashcode * 397) ^ Green.GetHashCode(); - hashcode = (hashcode * 397) ^ Blue.GetHashCode(); - hashcode = (hashcode * 397) ^ Alpha.GetHashCode(); - return hashcode; - } - } + public override int GetHashCode() => ToInt(); /// /// Determines whether the specified is equal to the current color using byte-precision comparison. /// - public virtual bool Equals(Color other) + public virtual bool Equals(Color? other) { if (other is null) return false; + if (EqualityContract != other.EqualityContract) + return false; + return ToInt() == other.ToInt(); } diff --git a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-android/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-ios/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-macos/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-tizen/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net-windows/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/net/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool diff --git a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt index 4460e5759c58..1736e1ff2860 100644 --- a/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt +++ b/src/Graphics/src/Graphics/PublicAPI/netstandard/PublicAPI.Unshipped.txt @@ -6,4 +6,4 @@ static Microsoft.Maui.Graphics.Color.operator ==(Microsoft.Maui.Graphics.Color? virtual Microsoft.Maui.Graphics.Color.$() -> Microsoft.Maui.Graphics.Color! virtual Microsoft.Maui.Graphics.Color.EqualityContract.get -> System.Type! virtual Microsoft.Maui.Graphics.Color.PrintMembers(System.Text.StringBuilder! builder) -> bool -~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color other) -> bool +~virtual Microsoft.Maui.Graphics.Color.Equals(Microsoft.Maui.Graphics.Color? other) -> bool