示例#1
0
文件: Router.cs 项目: tongange/CatLib
        /// <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);
        }
示例#2
0
文件: Scheme.cs 项目: U3DC/CatLib
 /// <summary>
 /// 增加一个路由
 /// </summary>
 /// <param name="route">路由条目</param>
 public Scheme AddRoute(Route route)
 {
     route.SetScheme(this);
     routes.Add(route);
     return(this);
 }