Files
Cleanuparr/code/Infrastructure/Verticals/Notifications/NotificationProvider.cs
2025-06-14 01:20:37 +03:00

34 lines
1.2 KiB
C#

using Common.Configuration.Notification;
using Infrastructure.Configuration;
using Infrastructure.Verticals.Notifications.Models;
using Microsoft.Extensions.Options;
namespace Infrastructure.Verticals.Notifications;
public abstract class NotificationProvider : INotificationProvider
{
private readonly IConfigManager _configManager;
protected readonly NotificationsConfig _config;
public abstract NotificationConfig Config { get; }
protected NotificationProvider(IConfigManager configManager)
{
_configManager = configManager;
_config = configManager.GetConfiguration<NotificationsConfig>();
}
public abstract string Name { get; }
public abstract Task OnFailedImportStrike(FailedImportStrikeNotification notification);
public abstract Task OnStalledStrike(StalledStrikeNotification notification);
public abstract Task OnSlowStrike(SlowStrikeNotification notification);
public abstract Task OnQueueItemDeleted(QueueItemDeletedNotification notification);
public abstract Task OnDownloadCleaned(DownloadCleanedNotification notification);
public abstract Task OnCategoryChanged(CategoryChangedNotification notification);
}