/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit.Newtonsoft/Serialization/RawXmlMessageSerializer.cs
31 строка
927 B
Chris Patterson
Fixed #5255 - Newtonsoft not setting raw message headers properly when copying raw message body
16 июн 2024, 03:33
16 июн 2024, 03:33
ff9de5c
Код
Авторство
О чём код?
namespace MassTransit.Serialization { using System.Net.Mime; public class RawXmlMessageSerializer : RawMessageSerializer, IMessageSerializer { public const string ContentTypeHeaderValue = "application/xml"; public static readonly ContentType RawXmlContentType = new ContentType(ContentTypeHeaderValue); readonly RawSerializerOptions _options; public RawXmlMessageSerializer(RawSerializerOptions options = RawSerializerOptions.Default) { _options = options; } public ContentType ContentType => RawXmlContentType; public MessageBody GetMessageBody<T>(SendContext<T> context) where T : class { if (_options.HasFlag(RawSerializerOptions.AddTransportHeaders)) SetRawMessageHeaders(context); return new NewtonsoftRawXmlMessageBody<T>(context); } } }