/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Transports/DelegatePartitionKeyFormatter.cs
22 строки
560 B
Chris Patterson
Standardized the topology for partition key across service bus, event hub, and the SQL transport
25 апр 2024, 21:50
25 апр 2024, 21:50
e7c59ea
Код
Авторство
О чём код?
namespace MassTransit.Transports { using System; public class DelegatePartitionKeyFormatter<TMessage> : IMessagePartitionKeyFormatter<TMessage> where TMessage : class { readonly Func<SendContext<TMessage>, string> _formatter; public DelegatePartitionKeyFormatter(Func<SendContext<TMessage>, string> formatter) { _formatter = formatter; } public string FormatPartitionKey(SendContext<TMessage> context) { return _formatter(context) ?? ""; } } }