Open ashishonce opened 5 years ago
@mperdeck please review
Have @Tratcher
review after .NET 8 RTW
app.MapWhen
creates a new branch in the middleware pipeline, and only middleware registered on the new branch is executed if the predicate passed to app.MapWhen
returns true
. Middleware registered on the main branch isn't executed.app.UseWhen
doesn't create a new branch in the middleware pipeline. All middleware registered after app.UseWhen
is executed, regardless of whether the predicate passed to app.UseWhen
returns true
or false
.
regarding this line
while creating a list of multiple middlewares.
app.MapWhen
is not forwarding the request to further pipeline, insteadapp.UseWhen
is working properlyEdit by @Rick-Anderson
2.5K PV
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.