DD.WellWorkover.Cloud/AsbCloudApp/Services/Notifications/INotificationTransportService.cs

35 lines
1.0 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AsbCloudApp.Data;
namespace AsbCloudApp.Services.Notifications;
/// <summary>
/// Интерфейс для отправителя уведомлений
/// </summary>
public interface INotificationTransportService
{
/// <summary>
/// Id типа доставки уведомления
/// </summary>
int IdTransportType { get; }
/// <summary>
/// Отправка одного уведомления
/// </summary>
/// <param name="notification"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task SendAsync(NotificationDto notification,
CancellationToken cancellationToken);
/// <summary>
/// Отправка нескольких уведомлений
/// </summary>
/// <param name="notifications"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task SendRangeAsync(IEnumerable<NotificationDto> notifications,
CancellationToken cancellationToken);
}