- tweak: remove dependency from Nebula.Shared

This commit is contained in:
2025-05-02 10:56:19 +03:00
parent 7187b4fba8
commit 4178c173e1
14 changed files with 461 additions and 76 deletions

View File

@@ -1,8 +1,6 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using Microsoft.Extensions.DependencyInjection;
using Nebula.Shared;
namespace Nebula.UpdateResolver;
@@ -15,15 +13,11 @@ public partial class App : Application
public override void OnFrameworkInitializationCompleted()
{
var services = new ServiceCollection();
services.AddServices();
services.AddTransient<MainWindow>();
var serviceProvider = services.BuildServiceProvider();
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
{
desktop.MainWindow = serviceProvider.GetService<MainWindow>();
desktop.MainWindow = new MainWindow();
}
base.OnFrameworkInitializationCompleted();