using BetterGenshinImpact.ViewModel; using Microsoft.Extensions.DependencyInjection; using System.Windows; using System.Windows.Controls; namespace BetterGenshinImpact.Helpers.Extensions; internal static class DependencyInjectionExtensions { public static IServiceCollection AddView(this IServiceCollection services) where TWindow : class where TWindowImplementation : class, TWindow where TViewModel : class, IViewModel { return services .AddSingleton() .AddSingleton(); } public static IServiceCollection AddView(this IServiceCollection services) where TPage : FrameworkElement where TViewModel : class, IViewModel { return services .AddSingleton() .AddSingleton(); } }