using Hyperbar.Desktop.Controls; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.UI.Xaml; using System; namespace Hyperbar.Desktop; public partial class App : Application { public App() => InitializeComponent(); protected override async void OnLaunched(LaunchActivatedEventArgs args) { base.OnLaunched(args); IHost? host = Host.CreateDefaultBuilder() .UseContentRoot(AppContext.BaseDirectory) .ConfigureServices(args => { args.AddTransient(); args.AddTransient(); args.AddTransient(); args.AddTransient(); args.AddDataTemplate("Commands"); args.AddDataTemplate(); args.AddHostedService(); }) .Build(); await host.RunAsync(); } }