Replace Mediator with Messenger

This commit is contained in:
Dan Clark
2024-11-16 13:52:03 +00:00
parent 469a52efaa
commit f16dbaf375
73 changed files with 615 additions and 1345 deletions
+2 -4
View File
@@ -4,9 +4,9 @@ namespace Toolkit.Foundation;
public class NavigateHandler(NamedComponent scope,
IComponentScopeProvider componentScopeProvider) :
INotificationHandler<NavigateEventArgs>
IHandler<NavigateEventArgs>
{
public Task Handle(NavigateEventArgs args)
public void Handle(NavigateEventArgs args)
{
INavigation? navigation = null;
if (args.Scope is "self" || args.Scope is "new")
@@ -34,7 +34,5 @@ public class NavigateHandler(NamedComponent scope,
navigation?.Navigate(args.Route, args.Sender,
args.Region, args.Navigated, args.Parameters);
return Task.CompletedTask;
}
}