forked from ddrilling/AsbCloudServer
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
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);
|
|
} |