/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/MessageData/Configuration/PutMessageDataTransformConfiguration.cs
37 строк
1 KB
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.MessageData.Configuration { using System; using System.Reflection; using Initializers.PropertyProviders; using PropertyProviders; public class PutMessageDataTransformConfiguration<TInput, TValue> : IMessageDataTransformConfiguration<TInput> where TInput : class { readonly PropertyInfo _property; readonly IMessageDataRepository _repository; public PutMessageDataTransformConfiguration(IMessageDataRepository repository, PropertyInfo property) { if (repository == null) throw new ArgumentNullException(nameof(repository)); _property = property; _repository = repository; } public void Apply(ITransformConfigurator<TInput> configurator) { if (!MessageTypeCache<TInput>.IsValidMessageType) return; var inputPropertyProvider = new InputPropertyProvider<TInput, MessageData<TValue>>(_property); var provider = new PutMessageDataPropertyProvider<TInput, TValue>(inputPropertyProvider, _repository); configurator.Set(_property, provider); } } }