Skip to content

Commit e54a8f9

Browse files
Add [EditorBrowsable(EditorBrowsableState.Never)] to Obsolete classes
1 parent 7eefd49 commit e54a8f9

File tree

9 files changed

+23
-13
lines changed

9 files changed

+23
-13
lines changed

src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupHandler.shared.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.ComponentModel;
2+
13
namespace CommunityToolkit.Maui.Core.Handlers;
24

35
/// <summary>
@@ -6,7 +8,7 @@ namespace CommunityToolkit.Maui.Core.Handlers;
68
#if NET10_0_OR_GREATER
79
#error Remove PopupHandler
810
#endif
9-
[Obsolete($"{nameof(PopupHandler)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
11+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(PopupHandler)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1012
public partial class PopupHandler
1113
{
1214
/// <summary>

src/CommunityToolkit.Maui.Core/Interfaces/IPopup.shared.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.ComponentModel;
12
using IElement = Microsoft.Maui.IElement;
23
using LayoutAlignment = Microsoft.Maui.Primitives.LayoutAlignment;
34

@@ -9,7 +10,7 @@ namespace CommunityToolkit.Maui.Core;
910
#if NET10_0_OR_GREATER
1011
#error Remove IPopup
1112
#endif
12-
[Obsolete($"{nameof(IPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
13+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(IPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1314
public interface IPopup : IElement, IVisualTreeElement, IAsynchronousHandler
1415
{
1516
/// <summary>

src/CommunityToolkit.Maui.Core/Views/Popup/MauiPopup.android.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
using System.ComponentModel;
2+
using System.Diagnostics.CodeAnalysis;
23
using Android.Content;
34
using Android.Views;
45
using Microsoft.Maui.Platform;
@@ -12,7 +13,7 @@ namespace CommunityToolkit.Maui.Core.Views;
1213
#if NET10_0_OR_GREATER
1314
#error Remove MauiPopup
1415
#endif
15-
[Obsolete($"{nameof(MauiPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
16+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(MauiPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1617
public class MauiPopup : Dialog, IDialogInterfaceOnCancelListener
1718
{
1819
readonly IMauiContext mauiContext;

src/CommunityToolkit.Maui.Core/Views/Popup/MauiPopup.macios.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.ComponentModel;
12
using System.Diagnostics.CodeAnalysis;
23
using CommunityToolkit.Maui.Core.Extensions;
34
using Microsoft.Maui.ApplicationModel;
@@ -16,7 +17,7 @@ namespace CommunityToolkit.Maui.Core.Views;
1617
#if NET10_0_OR_GREATER
1718
#error Remove MauiPopup
1819
#endif
19-
[Obsolete($"{nameof(MauiPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
20+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(MauiPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
2021
public class MauiPopup(IMauiContext mauiContext) : UIViewController
2122
{
2223
readonly IMauiContext mauiContext = mauiContext ?? throw new ArgumentNullException(nameof(mauiContext));

src/CommunityToolkit.Maui.Core/Views/Popup/MauiPopup.tizen.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Microsoft.Maui.Platform;
1+
using System.ComponentModel;
2+
using Microsoft.Maui.Platform;
23
using Microsoft.Maui.Primitives;
34
using Tizen.NUI;
45
using Tizen.UIExtensions.NUI;
@@ -13,7 +14,7 @@ namespace CommunityToolkit.Maui.Core.Views;
1314
#if NET10_0_OR_GREATER
1415
#error Remove MauiPopup
1516
#endif
16-
[Obsolete($"{nameof(MauiPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
17+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(MauiPopup)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1718
public class MauiPopup : Popup
1819
{
1920
readonly IMauiContext mauiContext;

src/CommunityToolkit.Maui.Core/Views/Popup/PopupExtensions.android.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Diagnostics.CodeAnalysis;
1+
using System.ComponentModel;
2+
using System.Diagnostics.CodeAnalysis;
23
using Android.Graphics.Drawables;
34
using Android.Views;
45
using CommunityToolkit.Maui.Core.Handlers;
@@ -17,7 +18,7 @@ namespace CommunityToolkit.Maui.Core.Views;
1718
#if NET10_0_OR_GREATER
1819
#error Remove MauiPopup
1920
#endif
20-
[Obsolete($"{nameof(PopupExtensions)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
21+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(PopupExtensions)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
2122
public static class PopupExtensions
2223
{
2324
/// <summary>

src/CommunityToolkit.Maui.Core/Views/Popup/PopupExtensions.macios.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.ComponentModel;
12
using Microsoft.Maui.Platform;
23
using ObjCRuntime;
34

@@ -8,7 +9,7 @@ namespace CommunityToolkit.Maui.Core.Views;
89
#if NET10_0_OR_GREATER
910
#error Remove PopupExtensions
1011
#endif
11-
[Obsolete($"{nameof(PopupExtensions)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
12+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(PopupExtensions)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1213
public static class PopupExtensions
1314
{
1415
static readonly nfloat defaultPopoverLayoutMargin = 0.0001f;

src/CommunityToolkit.Maui.Core/Views/Popup/PopupExtensions.windows.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.ComponentModel;
12
using CommunityToolkit.Maui.Core.Handlers;
23
using Microsoft.Maui.Platform;
34
using Microsoft.Maui.Primitives;
@@ -13,7 +14,7 @@ namespace CommunityToolkit.Maui.Core.Views;
1314
#if NET10_0_OR_GREATER
1415
#error Remove PopupExtensions
1516
#endif
16-
[Obsolete($"{nameof(PopupExtensions)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
17+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(PopupExtensions)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1718
public static class PopupExtensions
1819
{
1920
/// <summary>

src/CommunityToolkit.Maui.Core/Views/Popup/PopupOverlay.windows.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
namespace CommunityToolkit.Maui.Core.Views;
1+
using System.ComponentModel;
2+
namespace CommunityToolkit.Maui.Core.Views;
23

34
/// <summary>
45
/// Displays Overlay in the Popup background.
56
/// </summary>
67
#if NET10_0_OR_GREATER
78
#error Remove PopupOverlay
89
#endif
9-
[Obsolete($"{nameof(PopupOverlay)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
10+
[EditorBrowsable(EditorBrowsableState.Never), Obsolete($"{nameof(PopupOverlay)} is no longer used by {nameof(CommunityToolkit)}.{nameof(Maui)} and will be removed in .NET 10")]
1011
class PopupOverlay : WindowOverlay
1112
{
1213
readonly IWindowOverlayElement popupOverlayElement;

0 commit comments

Comments
 (0)