Skip to content

Commit

Permalink
remove obsolete methods
Browse files Browse the repository at this point in the history
  • Loading branch information
berhir committed Mar 26, 2024
1 parent 4b249cc commit 25c5176
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
2 changes: 0 additions & 2 deletions src/Maui/Prism.Maui/Navigation/Builder/INavigationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public interface INavigationBuilder
INavigationBuilder UseAbsoluteNavigation(bool absolute);
INavigationBuilder UseRelativeNavigation();

[Obsolete($"Use {nameof(GoBackAsync)} instead.")]
Task<INavigationResult> GoBackTo<TViewModel>(INavigationParameters parameters);
Task<INavigationResult> GoBackAsync<TViewModel>();
Task<INavigationResult> NavigateAsync();
Task NavigateAsync(Action<Exception> onError);
Expand Down
7 changes: 0 additions & 7 deletions src/Maui/Prism.Maui/Navigation/Builder/NavigationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@ public INavigationBuilder AddParameter(string key, object value)
return this;
}

[Obsolete($"Use {nameof(GoBackAsync)} instead.")]
public async Task<INavigationResult> GoBackTo<TViewModel>(INavigationParameters parameters)
{
var name = NavigationBuilderExtensions.GetNavigationKey<TViewModel>(this);
return await _navigationService.GoBackAsync(name, parameters);
}

public async Task<INavigationResult> GoBackAsync<TViewModel>()
{
var name = NavigationBuilderExtensions.GetNavigationKey<TViewModel>(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<INavigationResult> GoBackTo<TViewModel>(this INavigationBuilder builder) =>
builder.GoBackAsync<TViewModel>();

internal static string GetNavigationKey<TViewModel>(object builder)
{
var vmType = typeof(TViewModel);
Expand Down
10 changes: 0 additions & 10 deletions src/Maui/Prism.Maui/Navigation/INavigationServiceExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@ namespace Prism.Navigation;
/// </summary>
public static class INavigationServiceExtensions
{
/// <summary>
/// Navigates to the most recent entry in the back navigation history by popping the calling Page off the navigation stack.
/// </summary>
/// <param name="navigationService">Service for handling navigation between views</param>
/// <param name="name">The name of the View to navigate back to</param>
/// <returns><see cref="INavigationResult"/> indicating whether the request was successful or if there was an encountered <see cref="Exception"/>.</returns>
[Obsolete($"Use {nameof(GoBackAsync)} instead.")]
public static Task<INavigationResult> GoBackToAsync(this INavigationService navigationService, string name) =>
navigationService.GoBackAsync(name, null);

/// <summary>
/// Navigates to the most recent entry in the back navigation history by popping the calling Page off the navigation stack.
/// </summary>
Expand Down

0 comments on commit 25c5176

Please sign in to comment.