1
0
mirror of synced 2024-06-29 07:17:39 +00:00
Tapeti/Tapeti/Config/IControllerCleanupMiddleware.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
681 B
C#

using System;
using System.Threading.Tasks;
namespace Tapeti.Config
{
/// <summary>
/// Denotes middleware that runs after controller methods.
/// </summary>
public interface IControllerCleanupMiddleware : IControllerMiddlewareBase
{
/// <summary>
/// Called after the message handler method, even if exceptions occured.
/// </summary>
/// <param name="context"></param>
/// <param name="consumeResult"></param>
/// <param name="next">Always call to allow the next in the chain to clean up</param>
ValueTask Cleanup(IMessageContext context, ConsumeResult consumeResult, Func<ValueTask> next);
}
}