Register AnnotationManager as transient service

Updated DI comment for clarity on service lifetimes and added AnnotationManager as a transient service to the dependency injection container.
This commit is contained in:
2026-02-25 17:03:59 +01:00
parent 51ab9fb094
commit 2172ce8203

View File

@@ -21,7 +21,7 @@ public static class DependencyInjection
services.AddSingleton<State>(); services.AddSingleton<State>();
services.AddScoped<MSSQLServer>(); services.AddScoped<MSSQLServer>();
//TODO: Check lifetime of services. They might be singeton. //TODO: Check lifetime of services. They might be singleton or scoped.
services.AddTransient<GdViewer>(); services.AddTransient<GdViewer>();
// Add LicenseManager // Add LicenseManager
services.AddTransient(provider => services.AddTransient(provider =>
@@ -31,6 +31,7 @@ public static class DependencyInjection
licenseManager.RegisterKEY(options.GdPictureLicenseKey); licenseManager.RegisterKEY(options.GdPictureLicenseKey);
return licenseManager; return licenseManager;
}); });
services.AddTransient<AnnotationManager>();
return services; return services;
} }