2023-07-11 19:07:57 +05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using AsbCloudApp.Data;
|
|
|
|
|
|
|
|
namespace AsbCloudApp.Services.Notifications;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Интерфейс для отправителя уведомлений
|
|
|
|
/// </summary>
|
2023-07-13 14:44:40 +05:00
|
|
|
public interface INotificationTransportService
|
2023-07-11 19:07:57 +05:00
|
|
|
{
|
|
|
|
/// <summary>
|
2023-07-13 14:44:40 +05:00
|
|
|
/// Id типа доставки уведомления
|
2023-07-11 19:07:57 +05:00
|
|
|
/// </summary>
|
2023-07-13 14:44:40 +05:00
|
|
|
int IdTransportType { get; }
|
2023-07-11 19:07:57 +05:00
|
|
|
|
|
|
|
/// <summary>
|
2023-08-04 09:47:22 +05:00
|
|
|
/// Отправка одного уведомления
|
2023-07-11 19:07:57 +05:00
|
|
|
/// </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>
|
2023-07-14 11:40:57 +05:00
|
|
|
Task SendRangeAsync(IEnumerable<NotificationDto> notifications,
|
2023-07-11 19:07:57 +05:00
|
|
|
CancellationToken cancellationToken);
|
|
|
|
}
|