Skip to content

Commit c9975b7

Browse files
reck1610pictos
andcommitted
Typo and add the attribute to hide this method from intellisense
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
1 parent 7cabea1 commit c9975b7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/CommunityToolkit.Maui.Core/Extensions/ColorConversionExtensions.shared.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Globalization;
1+
using System.ComponentModel;
2+
using System.Globalization;
23

34
namespace CommunityToolkit.Maui.Core.Extensions;
45

@@ -45,7 +46,8 @@ public static string ToRgbString(this Color color)
4546
/// and <b>alpha</b> is a value between 0 and 1. (e.g. <c>RGBA(255,0,0,1)</c> for <see cref="Colors.Red"/>).
4647
/// </returns>
4748
/// <exception cref="ArgumentNullException">Thrown when <paramref name="color"/> is null.</exception>
48-
[Obsolete("Dont use CultureInfo this method should be culture invariant")]
49+
[EditorBrowsable(EditorBrowsableState.Never)]
50+
[Obsolete("Do not use CultureInfo, this method should be culture invariant.")]
4951
public static string ToRgbaString(this Color color, CultureInfo? cultureInfo) => ToRgbaString(color);
5052

5153

@@ -90,7 +92,8 @@ public static string ToCmykString(this Color color)
9092
/// </returns>
9193
/// <exception cref="ArgumentNullException">Thrown when <paramref name="color"/> is null.</exception>
9294

93-
[Obsolete("Dont use CultureInfo this method should be culture invariant")]
95+
[EditorBrowsable(EditorBrowsableState.Never)]
96+
[Obsolete("Do not use CultureInfo, this method should be culture invariant.")]
9497
public static string ToCmykaString(this Color color, CultureInfo? cultureInfo) => ToCmykaString(color);
9598

9699
/// <summary>
@@ -133,7 +136,8 @@ public static string ToHslString(this Color color)
133136
/// will be a value between 0% and 100%, and <b>alpha</b> will be a value between 0 and 1. (e.g. <c>HSLA(0,100%,50%,1)</c> for <see cref="Colors.Red"/>).
134137
/// </returns>
135138
/// <exception cref="ArgumentNullException">Thrown when <paramref name="color"/> is null.</exception>
136-
[Obsolete("Dont use CultureInfo this method should be culture invariant")]
139+
[EditorBrowsable(EditorBrowsableState.Never)]
140+
[Obsolete("Do not use CultureInfo, this method should be culture invariant.")]
137141
public static string ToHslaString(this Color color, CultureInfo? cultureInfo) => ToHslaString(color);
138142

139143
/// <summary>

0 commit comments

Comments
 (0)