Files
Pf2eDataScrapper/Pf2eDataScrapper/WPF/WpfServiceProviderExtension.cs
T

24 lines
701 B
C#

using Microsoft.Extensions.DependencyInjection;
using Pf2eDataScrapper.WPF.Components;
using Pf2eDataScrapper.WPF.Stores;
using Pf2eDataScrapper.WPF.ViewModels;
namespace Pf2eDataScrapper.WPF;
public static class WpfServiceProviderExtension
{
public static IServiceCollection RegisterWpfServices(this IServiceCollection collection)
{
return collection
// ViewModels
.AddTransient<EntityFormViewModel>()
.AddTransient<DbEntityListViewModel>()
.AddTransient<EntityViewViewModel>()
// Stores
.AddSingleton<SelectedEntityTypeStore>()
.AddSingleton<SelectedEntityStore>()
//
;
}
}