mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 14:13:18 +08:00
25 lines
669 B
C#
25 lines
669 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);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|