mirror of
https://github.com/bitwarden/server
synced 2026-01-10 12:33:49 +00:00
25 lines
673 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|