// Copyright (c) Arlo Godfrey. All Rights Reserved.
// Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms.
// See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information.
using System;
namespace StrixMusic.Sdk.Services.Navigation
{
///
/// Handles events in the UI that will usually result in navigating between pages.
///
/// The type of the UI Elements for the app.
[Obsolete("This pattern is being phased out and this class should not be used. Use the Messenger pattern instead.")]
public interface INavigationService
{
///
/// Raised when a navigation is requested.
///
event EventHandler> NavigationRequested;
///
/// Raised when a back navigation is requested
///
event EventHandler BackRequested;
///
/// Registers a page to have its state cached.
///
///
/// must inherit .
/// A registered page cannot contain arguments.
///
/// The of the page cached.
void RegisterCommonPage(Type type);
///
/// Registers an instance of a page to have its state cached.
///
/// The implementation of the page cached.
void RegisterCommonPage(T type);
///
/// Raises the event based on the arguments
///
/// The type of the page to navigate to.
/// Whether or not the page is an overlay.
/// The arguments for creating the page object.
void NavigateTo(Type type, bool overlay = false, params object[] args);
///
/// Raises the event based on the arguments
///
/// The page object to navigate to.
/// Whether or not the page is an overlay.
void NavigateTo(T type, bool overlay = false);
///
/// Raises the event
///
void GoBack();
}
}