/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/Persistence/MassTransit.Azure.Table/AzureTable/AzureTableAuditStore.cs
26 строк
774 B
Michelle Li
upgrade from Microsoft.Azure.Cosmos.Table to Azure.Data.Tables
03 ноя 2024, 21:05
03 ноя 2024, 21:05
affb5f9
Код
Авторство
О чём код?
namespace MassTransit.AzureTable { using System.Threading.Tasks; using Audit; using Azure.Data.Tables; public class AzureTableAuditStore : IMessageAuditStore { readonly IPartitionKeyFormatter _partitionKeyFormatter; readonly TableClient _table; public AzureTableAuditStore(TableClient table, IPartitionKeyFormatter partitionKeyFormatter) { _table = table; _partitionKeyFormatter = partitionKeyFormatter; } Task IMessageAuditStore.StoreMessage<T>(T message, MessageAuditMetadata metadata) { var auditRecord = AuditRecord.Create(message, metadata, _partitionKeyFormatter); return _table.UpsertEntityAsync(auditRecord); } } }