From 25c51767abf9f56602b3b7ac0f81d499d5702ec6 Mon Sep 17 00:00:00 2001 From: Bernd Hirschmann Date: Tue, 26 Mar 2024 08:45:45 +0100 Subject: [PATCH] remove obsolete methods --- .../Navigation/Builder/INavigationBuilder.cs | 2 -- .../Prism.Maui/Navigation/Builder/NavigationBuilder.cs | 7 ------- .../Navigation/Builder/NavigationBuilderExtensions.cs | 4 ---- .../Navigation/INavigationServiceExtensions.cs | 10 ---------- 4 files changed, 23 deletions(-) diff --git a/src/Maui/Prism.Maui/Navigation/Builder/INavigationBuilder.cs b/src/Maui/Prism.Maui/Navigation/Builder/INavigationBuilder.cs index 9fb4920a4..5ad620a99 100644 --- a/src/Maui/Prism.Maui/Navigation/Builder/INavigationBuilder.cs +++ b/src/Maui/Prism.Maui/Navigation/Builder/INavigationBuilder.cs @@ -12,8 +12,6 @@ public interface INavigationBuilder INavigationBuilder UseAbsoluteNavigation(bool absolute); INavigationBuilder UseRelativeNavigation(); - [Obsolete($"Use {nameof(GoBackAsync)} instead.")] - Task GoBackTo(INavigationParameters parameters); Task GoBackAsync(); Task NavigateAsync(); Task NavigateAsync(Action onError); diff --git a/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilder.cs b/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilder.cs index d2340f038..5f90e14a1 100644 --- a/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilder.cs +++ b/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilder.cs @@ -53,13 +53,6 @@ public INavigationBuilder AddParameter(string key, object value) return this; } - [Obsolete($"Use {nameof(GoBackAsync)} instead.")] - public async Task GoBackTo(INavigationParameters parameters) - { - var name = NavigationBuilderExtensions.GetNavigationKey(this); - return await _navigationService.GoBackAsync(name, parameters); - } - public async Task GoBackAsync() { var name = NavigationBuilderExtensions.GetNavigationKey(this); diff --git a/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilderExtensions.cs b/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilderExtensions.cs index a789476ad..355416bf9 100644 --- a/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilderExtensions.cs +++ b/src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilderExtensions.cs @@ -13,10 +13,6 @@ public static class NavigationBuilderExtensions public static INavigationBuilder CreateBuilder(this INavigationService navigationService) => new NavigationBuilder(navigationService); - [Obsolete($"Use {nameof(INavigationBuilder.GoBackAsync)} instead.")] - public static Task GoBackTo(this INavigationBuilder builder) => - builder.GoBackAsync(); - internal static string GetNavigationKey(object builder) { var vmType = typeof(TViewModel); diff --git a/src/Maui/Prism.Maui/Navigation/INavigationServiceExtensions.cs b/src/Maui/Prism.Maui/Navigation/INavigationServiceExtensions.cs index 749cb5122..ebf1a5c6d 100644 --- a/src/Maui/Prism.Maui/Navigation/INavigationServiceExtensions.cs +++ b/src/Maui/Prism.Maui/Navigation/INavigationServiceExtensions.cs @@ -7,16 +7,6 @@ namespace Prism.Navigation; /// public static class INavigationServiceExtensions { - /// - /// Navigates to the most recent entry in the back navigation history by popping the calling Page off the navigation stack. - /// - /// Service for handling navigation between views - /// The name of the View to navigate back to - /// indicating whether the request was successful or if there was an encountered . - [Obsolete($"Use {nameof(GoBackAsync)} instead.")] - public static Task GoBackToAsync(this INavigationService navigationService, string name) => - navigationService.GoBackAsync(name, null); - /// /// Navigates to the most recent entry in the back navigation history by popping the calling Page off the navigation stack. ///