/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Middleware/IPipeConnector.cs
66 строк
2 KB
Chris Patterson
Huge push towards optimization on startup, state machines, type discovery, caching, and the consume pipeline. Rebuilt the dispatch filter as a consume context filter for message type dispatch.
27 мар 2024, 02:43
27 мар 2024, 02:43
c17b1de
Код
Авторство
О чём код?
namespace MassTransit.Middleware { /// <summary> /// The intent is to connect a pipe of a specific type to a pipe of a different type, /// for which there is a provider that knows how to convert the input type to the output type. /// </summary> public interface IPipeConnector { /// <summary> /// Connect a pipe of the specified type to the DispatchFilter /// </summary> /// <typeparam name="T"></typeparam> /// <param name="pipe"></param> /// <returns></returns> ConnectHandle ConnectPipe<T>(IPipe<T> pipe) where T : class, PipeContext; } /// <summary> /// Connect a pipe of the same type as the target pipe /// </summary> /// <typeparam name="TContext"></typeparam> public interface IPipeConnector<out TContext> where TContext : class, PipeContext { ConnectHandle ConnectPipe(IPipe<TContext> pipe); } /// <summary> /// Supports connecting a pipe using a key, which is a method of dispatching to different pipes /// based on context. /// </summary> /// <typeparam name="TKey"></typeparam> public interface IKeyPipeConnector<in TKey> { /// <summary> /// Connect a pipe to the filter using the specified key /// </summary> /// <param name="key"></param> /// <param name="pipe"></param> /// <returns></returns> ConnectHandle ConnectPipe<T>(TKey key, IPipe<T> pipe) where T : class, PipeContext; } /// <summary> /// Supports connecting a pipe using a key, which is a method of dispatching to different pipes /// based on context. /// </summary> /// <typeparam name="TKey"></typeparam> /// <typeparam name="TMessage"></typeparam> public interface IKeyPipeConnector<out TMessage, in TKey> where TMessage : class { /// <summary> /// Connect a pipe to the filter using the specified key /// </summary> /// <param name="key"></param> /// <param name="pipe"></param> /// <returns></returns> ConnectHandle ConnectPipe(TKey key, IPipe<ConsumeContext<TMessage>> pipe); } }