/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Serialization/CopyBodySerializer.cs
29 строк
657 B
Chris Patterson
Integration of all external packages into MassTransit, split out into Abstractions, Middleware, and the core MassTransit assembly.
22 янв 2022, 18:24
22 янв 2022, 18:24
b5b4f50
Код
Авторство
О чём код?
namespace MassTransit.Serialization { using System.Net.Mime; /// <summary> /// Copies the body of the receive context to the send context unmodified /// </summary> public class CopyBodySerializer : IMessageSerializer { readonly MessageBody _body; public CopyBodySerializer(ContentType contentType, MessageBody body) { _body = body; ContentType = contentType; } public ContentType ContentType { get; } public MessageBody GetMessageBody<T>(SendContext<T> context) where T : class { return _body; } } }