diff --git a/src/MauiMicroMvvm/Internals/DefaultNavigation.cs b/src/MauiMicroMvvm/Internals/DefaultNavigation.cs index a79238d..97faa04 100644 --- a/src/MauiMicroMvvm/Internals/DefaultNavigation.cs +++ b/src/MauiMicroMvvm/Internals/DefaultNavigation.cs @@ -3,16 +3,16 @@ namespace MauiMicroMvvm.Internals; [EditorBrowsable(EditorBrowsableState.Never)] -public class DefaultNavigation : INavigation +public class DefaultNavigation : INavigation where TShell : Shell { - private readonly Shell _shell; + private readonly TShell _shell; - public DefaultNavigation(Shell shell) + public DefaultNavigation(TShell shell) { _shell = shell; } - public async Task GoToAsync(string uri) => + public async Task GoToAsync(string uri) => await _shell.GoToAsync(uri); public async Task GoToAsync(string uri, IDictionary parameters) => diff --git a/src/MauiMicroMvvm/Internals/PageDialogs.cs b/src/MauiMicroMvvm/Internals/PageDialogs.cs index e2c90fa..055d170 100644 --- a/src/MauiMicroMvvm/Internals/PageDialogs.cs +++ b/src/MauiMicroMvvm/Internals/PageDialogs.cs @@ -1,10 +1,10 @@ namespace MauiMicroMvvm.Internals; -internal class PageDialogs : IPageDialogs +internal class PageDialogs : IPageDialogs where TShell : Shell { - private readonly Shell _shell; + private readonly TShell _shell; - public PageDialogs(Shell shell) + public PageDialogs(TShell shell) { _shell = shell; } diff --git a/src/MauiMicroMvvm/MauiMicroBuilderExtensions.cs b/src/MauiMicroMvvm/MauiMicroBuilderExtensions.cs index 70d6c2d..3e1ab8a 100644 --- a/src/MauiMicroMvvm/MauiMicroBuilderExtensions.cs +++ b/src/MauiMicroMvvm/MauiMicroBuilderExtensions.cs @@ -15,8 +15,8 @@ public static MauiAppBuilder UseMauiMicroMvvm(this MauiAppBuilder builde .AddSingleton>() .AddSingleton() .AddSingleton() - .AddSingleton() - .AddSingleton() + .AddSingleton>() + .AddSingleton>() .AddScoped(); return builder; } @@ -58,7 +58,7 @@ public static MauiAppBuilder UseMauiMicroMvvm(this MauiAppBuilder {string.Join('\n', qualifiedResources)} "; - + app.Resources.LoadFromXaml(xaml); }