donetcore mvc
IStartupFilter接口的Configure方法就做了一件事,串联委托。将一个委托嵌套在一个新委托里。好比数据结构里面的链表。
public class AutoRequestServicesStartupFilter : IStartupFilter { public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next) { return builder => { builder.UseMiddleware<RequestServicesContainerMiddleware>(); next(builder); }; } }