Add some initial navigation route handlers

This commit is contained in:
Daniel Clark
2022-12-09 08:58:26 +00:00
parent fdcce769e5
commit 4c8fd3dae4
34 changed files with 403 additions and 343 deletions
@@ -1,9 +0,0 @@
namespace Toolkit.Foundation
{
public interface INavigationRouter : IInitializer
{
void Navigate(Navigate args);
void Register(string name, object route);
}
}
+4 -2
View File
@@ -1,6 +1,8 @@
namespace Toolkit.Foundation
using Mediator;
namespace Toolkit.Foundation
{
public record Navigate
public record Navigate : IRequest
{
public Navigate(string name, params object?[] parameters)
{
@@ -1,4 +1,7 @@
namespace Toolkit.Foundation
using Mediator;
namespace Toolkit.Foundation
{
public record NavigateBack(object Route);
public record NavigateBack(object Route) : IRequest;
}
@@ -1,18 +0,0 @@
namespace Toolkit.Foundation
{
//public class NavigateHandler : IRecipient<Navigate>
//{
// private readonly IMessenger messenger;
// public NavigateHandler(IMessenger messenger)
// {
// this.messenger = messenger;
// }
// public void Receive(Navigate request)
// {
// messenger.Send(request);
// }
//}
}
@@ -0,0 +1,6 @@
using Mediator;
namespace Toolkit.Foundation
{
public record NavigationRoute(string Name, object Route) : IRequest;
}