摘要:
通过DefaultActionDescriptorCollectionProvider类,我们获取到了应用的Controller和Action相关信息 后面分析Action是如何执行的 通过IActionSelector找到对应的ActionDescriptor 然后调用IActionInvoker 阅读全文
摘要:
创建完ApplicationModel后,调用ControllerActionDescriptorBuilder类的Build方法创建对应的ControllerActionDescriptor internal static class ControllerActionDescriptorBuild 阅读全文
摘要:
AuthorizationApplicationModelProvider 该类主要添加授权认证的过滤器 先在Controller和Action中找到实现IAuthorizeData的特性,再根据IAuthorizeData创建AuthorizeFilter过滤器,把AuthorizeFilter添 阅读全文
摘要:
前面讲到ApplicationModel对象,那接下来看看ApplicationModel /// <summary> /// A model for configuring controllers in an MVC application. /// </summary> [DebuggerDis 阅读全文
摘要:
看下应用如何构建出对应的ActionDescriptor DefaultActionDescriptorCollectionProvider internal class DefaultActionDescriptorCollectionProvider : ActionDescriptorColl 阅读全文
摘要:
我们先看下IApplicationBuilder接口的扩展方法UseMvc public static IApplicationBuilder UseMvc( this IApplicationBuilder app, Action<IRouteBuilder> configureRoutes) { 阅读全文
摘要:
public class KestrelServer : IServer { private readonly List<(IConnectionListener, Task)> _transports = new List<(IConnectionListener, Task)>(); priva 阅读全文
摘要:
EndpointRoute新的路由方案 public static class EndpointRoutingApplicationBuilderExtensions { private const string EndpointRouteBuilder = "__EndpointRouteBuil 阅读全文
摘要:
先看下IApplicationBuilder的扩展方法 public static IApplicationBuilder UseRouter(this IApplicationBuilder builder, IRouter router) { if (builder == null) { thr 阅读全文
摘要:
一、IFeatureCollection 表示Http特性的集合,该集合存放一些http相关特性,如IHttpRequestFeature、IHttpResponseFeature 当构建HttpContext、HttpRequest、HttpResponse对象时,会从这些特性里面解析构建对应的类 阅读全文