/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit.Newtonsoft/Serialization/NewtonsoftEncryptedV2SerializerFactory.cs
28 строк
773 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; public class NewtonsoftEncryptedV2SerializerFactory : ISerializerFactory { readonly ICryptoStreamProviderV2 _provider; public NewtonsoftEncryptedV2SerializerFactory(ICryptoStreamProviderV2 provider) { _provider = provider; } public ContentType ContentType => EncryptedMessageSerializerV2.EncryptedContentType; public IMessageSerializer CreateSerializer() { return new EncryptedMessageSerializerV2(_provider); } public IMessageDeserializer CreateDeserializer() { return new EncryptedMessageDeserializerV2(BsonMessageSerializer.Deserializer, _provider); } } }