1
0
mirror of https://github.com/bitwarden/server synced 2026-01-10 12:33:49 +00:00
Files
server/src/Core/Services/Implementations/BlockingMailQueueService.cs
2021-12-16 15:35:09 +01:00

25 lines
673 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using Bit.Core.Models.Mail;
namespace Bit.Core.Services
{
public class BlockingMailEnqueuingService : IMailEnqueuingService
{
public async Task EnqueueAsync(IMailQueueMessage message, Func<IMailQueueMessage, Task> fallback)
{
await fallback(message);
}
public async Task EnqueueManyAsync(IEnumerable<IMailQueueMessage> messages, Func<IMailQueueMessage, Task> fallback)
{
foreach (var message in messages)
{
await fallback(message);
}
}
}
}