/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Configuration/ConsumerPipeConfiguratorExtensions.cs
29 строк
1008 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 { using System; using Configuration; public static class ConsumerPipeConfiguratorExtensions { /// <summary> /// Adds a filter to the pipe /// </summary> /// <typeparam name="T">The context type</typeparam> /// <typeparam name="TConsumer"></typeparam> /// <param name="configurator">The pipe configurator</param> /// <param name="filter">The already built pipe</param> public static void UseFilter<TConsumer, T>(this IPipeConfigurator<ConsumerConsumeContext<TConsumer, T>> configurator, IFilter<ConsumerConsumeContext<TConsumer>> filter) where T : class where TConsumer : class { if (configurator == null) throw new ArgumentNullException(nameof(configurator)); var specification = new ConsumerFilterSpecification<TConsumer, T>(filter); configurator.AddPipeSpecification(specification); } } }