2022-06-29 19:46:41 -04:00
|
|
|
|
using Azure.Storage.Queues;
|
2017-12-08 14:03:07 -05:00
|
|
|
|
using Bit.Core.Models.Data;
|
2021-02-22 15:35:16 -06:00
|
|
|
|
using Bit.Core.Settings;
|
2022-01-21 09:36:25 -05:00
|
|
|
|
using Bit.Core.Utilities;
|
2017-12-04 09:58:07 -05:00
|
|
|
|
|
2022-08-29 15:53:48 -04:00
|
|
|
|
namespace Bit.Core.Services
|
2017-12-04 09:58:07 -05:00
|
|
|
|
{
|
2022-08-29 15:53:48 -04:00
|
|
|
|
public class AzureQueueEventWriteService : AzureQueueService<IEvent>, IEventWriteService
|
|
|
|
|
|
{
|
|
|
|
|
|
public AzureQueueEventWriteService(GlobalSettings globalSettings) : base(
|
|
|
|
|
|
new QueueClient(globalSettings.Events.ConnectionString, "event"),
|
|
|
|
|
|
JsonHelpers.IgnoreWritingNull)
|
|
|
|
|
|
{ }
|
2022-01-21 09:36:25 -05:00
|
|
|
|
|
2022-08-29 15:53:48 -04:00
|
|
|
|
public Task CreateAsync(IEvent e) => CreateManyAsync(new[] { e });
|
|
|
|
|
|
}
|
2017-12-04 09:58:07 -05:00
|
|
|
|
}
|