/// <summary> /// 产生一个路由条目 /// </summary> /// <param name="uri">uri</param> /// <param name="action">路由行为</param> /// <returns>路由条目</returns> private Route MakeRoute(Uri uri, RouteAction action) { var route = new Route(uri, action); route.SetRouter(this); route.SetScheme(schemes[uri.Scheme]); route.SetFilterChain(filterChain); route.SetContainer(container); return(route); }
/// <summary> /// 增加一个路由 /// </summary> /// <param name="route">路由条目</param> public Scheme AddRoute(Route route) { route.SetScheme(this); routes.Add(route); return(this); }