Esempio n. 1
0
 /// <summary>
 /// 注册路由条目
 /// </summary>
 public override void Register()
 {
     App.Singleton <Router>((app, param) =>
     {
         var router = new Router(App, app, app.Make <IFilterChain>());
         router.SetDefaultScheme("catlib");
         return(router);
     }).Alias <IRouter>();
 }
Esempio n. 2
0
        /// <summary>
        /// 注册路由条目
        /// </summary>
        public void Register()
        {
            App.Singleton <Router>((app, param) =>
            {
                var router = new Router(App.Handler, App.Handler);
                router.SetDefaultScheme("catlib");
                return(router);
            }).Alias <IRouter>();

            RegisterAttrRouteCompiler();
        }
Esempio n. 3
0
        /// <summary>
        /// 注册路由条目
        /// </summary>
        public override void Register()
        {
            App.Singleton <Router>((app, param) =>
            {
                var router = new Router(App, App);
                router.SetDefaultScheme("catlib");
                return(router);
            }).Alias <IRouter>().Alias("routing.router");

            RegisterAttrRouteCompiler();
        }
Esempio n. 4
0
        /// <summary>
        /// 注册路由条目
        /// </summary>
        public void Register()
        {
            App.Singleton <Router>((_, __) =>
            {
                var router = new Router(App.Handler, App.Handler);
                router.SetDefaultScheme(DefaultScheme);
                return(router);
            }).Alias <IRouter>();

            RegisterAttrRouteCompiler();
            RegisterFinderType();
        }
Esempio n. 5
0
        /// <summary>
        /// 注册路由条目
        /// </summary>
        public void Register()
        {
            App.Singleton <Router>((_, __) =>
            {
                var router = new Router(App.Handler, App.Handler);
                var config = App.Make <IConfig>();
                router.SetDefaultScheme(config.SafeGet("RoutingProvider.DefaultScheme", DefaultScheme));
                return(router);
            }).Alias <IRouter>();

            RegisterAttrRouteCompiler();
        }