1
0
mirror of synced 2024-06-29 15:27:40 +00:00
Tapeti/Tapeti/Config/IControllerMessageMiddleware.cs
Mark van Renswoude 165680fd38 Added ValueTask support
- This is a breaking change for custom middleware implementations
Added validation for return type handling
- This may be breaking for incorrect implementations, but highly unlikely
2022-02-09 11:27:07 +01:00

20 lines
715 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>
ValueTask Handle(IMessageContext context, Func<ValueTask> next);
}
}