forked from ddrilling/AsbCloudServer
21 lines
660 B
C#
21 lines
660 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using AsbCloudApp.Data;
|
|
using AsbCloudApp.Services.Notifications;
|
|
|
|
namespace AsbCloudInfrastructure.Services.Notifications;
|
|
|
|
public class NotificationSenderManager : INotificationSenderManager
|
|
{
|
|
private readonly IEnumerable<INotificationSender> notificationSenders;
|
|
|
|
public NotificationSenderManager(IEnumerable<INotificationSender> notificationSenders)
|
|
{
|
|
this.notificationSenders = notificationSenders;
|
|
}
|
|
|
|
public INotificationSender? GetOrDefault(NotificationTransport notificationTransport)
|
|
{
|
|
return notificationSenders.FirstOrDefault(x => x.NotificationTransport == notificationTransport);
|
|
}
|
|
} |