Ejemplo n.º 1
0
 public static InitRoute InitInstance()
 {
     if (_initRoute == null)
     {
         lock (lockObject)
         {
             if (_initRoute == null)
             {
                 _initRoute = new InitRoute();
             }
         }
     }
     return(_initRoute);
 }
Ejemplo n.º 2
0
        protected void Application_Start()
        {
            //AreaRegistration.RegisterAllAreas();
            //FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);


            var defaultPath = new Dictionary <string, object>();

            defaultPath.Add("controller", "Home");
            defaultPath.Add("action", "Index");
            defaultPath.Add("id", null);
            defaultPath.Add("namespaces", "Test.Controllers");
            defaultPath.Add("assembly", "Test");

            InitRoute init = InitRoute.InitInstance();

            init.InstanceController(defaultPath);

            MyRouteTable.Routes.Add("defaultRoute", new MyRoute("{controller}/{action}/{id}", defaultPath, new MyMvc.MVC.MvcRouteHandler()));

            //RouteConfig.RegisterRoutes(RouteTable.Routes);
            //BundleConfig.RegisterBundles(BundleTable.Bundles);
        }