mirror of
https://github.com/bitwarden/server.git
synced 2025-04-11 08:08:14 -05:00

* Start switch to System.Text.Json * Work on switching to System.Text.Json * Main work on STJ refactor * Fix build errors * Run formatting * Delete unused file * Use legacy for two factor providers * Run formatter * Add TokenProviderTests * Run formatting * Fix merge issues * Switch to use JsonSerializer * Address PR feedback * Fix formatting * Ran formatter * Switch to async * Ensure Enums are serialized as strings * Fix formatting * Enqueue single items as arrays * Remove CreateAsync method on AzureQueueService
22 lines
641 B
C#
22 lines
641 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
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 });
|
|
}
|
|
}
|