Adds conditional middleware that runs a sub-pipeline only when the
synchronous predicate returns true.
public IProcessMiddlewareBuilder UseWhen(Func<InvocationContext, bool> predicate, Action<IProcessMiddlewareBuilder> configuration)
The condition evaluated before each invocation.
An action that configures the sub-pipeline builder.