2019-08-13 18:30:04 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Config
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Denotes middleware that runs for controller methods.
|
|
|
|
|
/// </summary>
|
2020-07-02 09:43:24 +00:00
|
|
|
|
public interface IControllerMessageMiddleware : IControllerMiddlewareBase
|
2019-08-13 18:30:04 +00:00
|
|
|
|
{
|
|
|
|
|
/// <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>
|
2021-09-02 14:16:11 +00:00
|
|
|
|
Task Handle(IMessageContext context, Func<Task> next);
|
2019-08-13 18:30:04 +00:00
|
|
|
|
}
|
|
|
|
|
}
|