/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit.Abstractions/SagaStateMachine/IEventObserver.cs
60 строк
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 { using System; using System.Threading.Tasks; public interface IEventObserver<TSaga> where TSaga : class, SagaStateMachineInstance { /// <summary> /// Called before the event context is delivered to the activities /// </summary> /// <param name="context">The event context</param> /// <returns></returns> Task PreExecute(BehaviorContext<TSaga> context); /// <summary> /// Called before the event context is delivered to the activities /// </summary> /// <typeparam name="T">The event data type</typeparam> /// <param name="context">The event context</param> /// <returns></returns> Task PreExecute<T>(BehaviorContext<TSaga, T> context) where T : class; /// <summary> /// Called when the event has been processed by the activities /// </summary> /// <param name="context">The event context</param> /// <returns></returns> Task PostExecute(BehaviorContext<TSaga> context); /// <summary> /// Called when the event has been processed by the activities /// </summary> /// <typeparam name="T">The event data type</typeparam> /// <param name="context">The event context</param> /// <returns></returns> Task PostExecute<T>(BehaviorContext<TSaga, T> context) where T : class; /// <summary> /// Called when the activity execution faults and is not handled by the activities /// </summary> /// <param name="context">The event context</param> /// <param name="exception">The exception that was thrown</param> /// <returns></returns> Task ExecuteFault(BehaviorContext<TSaga> context, Exception exception); /// <summary> /// Called when the activity execution faults and is not handled by the activities /// </summary> /// <typeparam name="T">The message type</typeparam> /// <param name="context">The event context</param> /// <param name="exception">The exception that was thrown</param> /// <returns></returns> Task ExecuteFault<T>(BehaviorContext<TSaga, T> context, Exception exception) where T : class; } }