mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
18 lines
539 B
C#
18 lines
539 B
C#
using Azure.Storage.Queues;
|
|
using Bit.Core.Models.Data;
|
|
using Bit.Core.Settings;
|
|
using Bit.Core.Utilities;
|
|
|
|
namespace Bit.Core.Services
|
|
{
|
|
public class AzureQueueEventWriteService : AzureQueueService<IEvent>, IEventWriteService
|
|
{
|
|
public AzureQueueEventWriteService(GlobalSettings globalSettings) : base(
|
|
new QueueClient(globalSettings.Events.ConnectionString, "event"),
|
|
JsonHelpers.IgnoreWritingNull)
|
|
{ }
|
|
|
|
public Task CreateAsync(IEvent e) => CreateManyAsync(new[] { e });
|
|
}
|
|
}
|