Interface IMiddleware
The middleware interface. For streaming-version middleware, check IStreamingMiddleware.
public interface IMiddleware
Properties
Name
the name of the middleware
string? Name { get; }
Property Value
Methods
InvokeAsync(MiddlewareContext, IAgent, CancellationToken)
The method to invoke the middleware
Task<IMessage> InvokeAsync(MiddlewareContext context, IAgent agent, CancellationToken cancellationToken = default)
Parameters
context
MiddlewareContextagent
IAgentcancellationToken
CancellationToken