Restructure solution layout by module

This commit is contained in:
master
2025-10-28 15:10:40 +02:00
parent 95daa159c4
commit d870da18ce
4103 changed files with 192899 additions and 187024 deletions

View File

@@ -0,0 +1,33 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using StellaOps.Notify.Storage.Mongo.Internal;
using StellaOps.Notify.Storage.Mongo.Migrations;
using StellaOps.Notify.Storage.Mongo.Options;
using StellaOps.Notify.Storage.Mongo.Repositories;
namespace StellaOps.Notify.Storage.Mongo;
public static class ServiceCollectionExtensions
{
public static IServiceCollection AddNotifyMongoStorage(this IServiceCollection services, IConfiguration configuration)
{
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(configuration);
services.Configure<NotifyMongoOptions>(configuration);
services.AddSingleton<NotifyMongoContext>();
services.AddSingleton<NotifyMongoMigrationRunner>();
services.AddSingleton<INotifyMongoMigration, EnsureNotifyCollectionsMigration>();
services.AddSingleton<INotifyMongoMigration, EnsureNotifyIndexesMigration>();
services.AddSingleton<INotifyMongoInitializer, NotifyMongoInitializer>();
services.AddSingleton<INotifyRuleRepository, NotifyRuleRepository>();
services.AddSingleton<INotifyChannelRepository, NotifyChannelRepository>();
services.AddSingleton<INotifyTemplateRepository, NotifyTemplateRepository>();
services.AddSingleton<INotifyDeliveryRepository, NotifyDeliveryRepository>();
services.AddSingleton<INotifyDigestRepository, NotifyDigestRepository>();
services.AddSingleton<INotifyLockRepository, NotifyLockRepository>();
services.AddSingleton<INotifyAuditRepository, NotifyAuditRepository>();
return services;
}
}