This commit is contained in:
2026-06-28 13:58:35 +03:00
parent 8f45028715
commit e6bf8258bb
114 changed files with 4365 additions and 874 deletions
@@ -0,0 +1,28 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using NetDaemon.AppModel;
using LeakMonitorManager.Interface;
using LeakMonitorManager.Models;
namespace LeakMonitorManager;
public static class LeakMonitorServiceRegistration
{
public static IServiceCollection AddLeakMonitor(this IServiceCollection services, IConfiguration configuration)
{
var options = configuration
.GetSection(LeakMonitorOptions.SectionName)
.Get<LeakMonitorOptions>() ?? new LeakMonitorOptions();
if (!options.Enabled)
{
return services;
}
services
.AddNetDaemonApp<LeakMonitorInit>()
.AddScoped<ILeakNotificationService, LeakNotificationService>();
return services;
}
}