1
0
mirror of synced 2024-06-29 07:17:39 +00:00
Tapeti/Tapeti/Config/IControllerMessageMiddleware.cs
Mark van Renswoude be576a2409 Implemented #31: Include message details in exception logging (optionally)
Refactored IControllerMessageContext into context payloads to get access to it in the exception handler
2021-09-02 16:16:44 +02:00

20 lines
705 B
C#

using System;
using System.Threading.Tasks;
namespace Tapeti.Config
{
/// <summary>
/// Denotes middleware that runs for controller methods.
/// </summary>
public interface IControllerMessageMiddleware : IControllerMiddlewareBase
{
/// <summary>
/// Called after the message has passed any filter middleware and the controller has been instantiated,
/// but before the method has been called.
/// </summary>
/// <param name="context"></param>
/// <param name="next">Call to pass the message to the next handler in the chain or call the controller method</param>
Task Handle(IMessageContext context, Func<Task> next);
}
}