Files
GSS2Rework/GSS2.Test/DependencyInjectionHelper.cs
T

25 lines
874 B
C#

using GSS2.UI.Core.Views;
using GSS2.UI.Core.ViewModels;
using GSS2.Test.Views;
using GSS2.Test.ViewModels;
using GSS2.UI.Core.Services;
using Avalonia;
namespace GSS2.Test;
public static class DependencyInjectionHelper
{
public static IServiceCollection AddViewsAndModels(this IServiceCollection services) =>
services
.AddSingleton<NavigationService>((_) => new NavigationService(Application.Current?.ApplicationLifetime))
.AddSingleton<MainWindowViewModel>()
.AddSingleton<MainView>()
.AddSingleton<MainViewModel>()
.AddSingleton<ResourcesView>()
.AddSingleton<ResourcesViewModel>()
.AddSingleton<CameraView>()
.AddSingleton<CameraViewModel>()
.AddSingleton<IlluminatorControllerView>()
.AddSingleton<IlluminatorControllerViewModel>();
}