Update registration of pages
parent
6a1cbb018c
commit
1d8fbbb62c
|
@ -25,15 +25,6 @@ public static class MauiProgram
|
|||
|
||||
Barrel.ApplicationId = "dotnetpodcasts";
|
||||
|
||||
builder.Services.AddTransient<CategoriesPage>();
|
||||
builder.Services.AddTransient<CategoryPage>();
|
||||
builder.Services.AddTransient<DiscoverPage>();
|
||||
builder.Services.AddTransient<EpisodeDetailPage>();
|
||||
builder.Services.AddTransient<ListenLaterPage>();
|
||||
builder.Services.AddTransient<ListenTogetherPage>();
|
||||
builder.Services.AddTransient<SettingsPage>();
|
||||
builder.Services.AddTransient<ShowDetailPage>();
|
||||
builder.Services.AddTransient<SubscriptionsPage>();
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
namespace Microsoft.NetConf2021.Maui.Pages;
|
||||
namespace Microsoft.NetConf2021.Maui.Pages;
|
||||
|
||||
public static class PagesExtensions
|
||||
{
|
||||
public static MauiAppBuilder ConfigurePages(this MauiAppBuilder builder)
|
||||
{
|
||||
// main tabs of the app
|
||||
builder.Services.AddSingleton<DiscoverPage>();
|
||||
builder.Services.AddSingleton<SubscriptionsPage>();
|
||||
builder.Services.AddSingleton<ListenLaterPage>();
|
||||
builder.Services.AddSingleton<ListenTogetherPage>();
|
||||
builder.Services.AddSingleton<SettingsPage>();
|
||||
|
||||
// pages that are navigated to
|
||||
builder.Services.AddTransient<CategoriesPage>();
|
||||
builder.Services.AddTransient<CategoryPage>();
|
||||
builder.Services.AddTransient<EpisodeDetailPage>();
|
||||
builder.Services.AddTransient<ShowDetailPage>();
|
||||
builder.Services.AddTransient<SubscriptionsPage>();
|
||||
|
||||
return builder;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue