Files
Keys/App/Program.cs

30 lines
830 B
C#
Raw Normal View History

2025-09-17 17:50:29 +02:00
using Microsoft.Extensions.DependencyInjection;
namespace App;
class Program
2025-09-13 17:36:46 +02:00
{
2025-09-17 17:50:29 +02:00
private static ServiceProvider? provider;
static int Main()
{
provider = SetupServices();
var application = Adw.Application.New("org.typomustakes.keychain", Gio.ApplicationFlags.FlagsNone);
application.OnActivate += (sender, args) =>
{
var window = new App.UI.MainWindow().Window;
window.Application = (Adw.Application)sender;
window.Show();
};
return application.RunWithSynchronizationContext(null);
}
2025-09-13 17:36:46 +02:00
2025-09-17 17:50:29 +02:00
private static ServiceProvider SetupServices()
{
var services = new ServiceCollection();
services.AddTransient<IPasswordStoreService, PasswordStoreService>();
return services.BuildServiceProvider();
}
}