Moved source to subfolder

This commit is contained in:
2025-09-26 11:04:03 +02:00
parent 22ad11add1
commit 6902aeb9c0
17 changed files with 0 additions and 0 deletions

33
src/App/Program.cs Normal file
View File

@@ -0,0 +1,33 @@
using Microsoft.Extensions.DependencyInjection;
using Logic;
using Repository;
namespace Keychain;
class Program
{
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 UI.MainWindow().Window;
window.Application = (Adw.Application)sender;
window.Show();
};
return application.RunWithSynchronizationContext(null);
}
private static ServiceProvider SetupServices()
{
var services = new ServiceCollection();
services.AddSingleton<IPasswordStoreService, PasswordStoreService>();
services.AddSingleton<IRepository, JsonRepository>();
return services.BuildServiceProvider();
}
}