关于[ASP.NET Core middleware with Roslyn Analyzers - Part 1]的摘要:
Middleware works like pearls on a string. The order you add your middleware determines which middleware is called first and which is called last. This can cause serious problems, like error logging middleware that is never notified of the errors happening. The problem is already nicely described in Andrew Lock's Inserting middleware between UseRouting() and UseEndpoints() as a library author - Part 1 and Part 2, so make sure to read through those if you have felt the pain in your projects already.
原文地址: https://blog.elmah.io/asp-net-core-middleware-with-roslyn-analyzers-part-1/