Exemplo n.º 1
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("UserManager_ResourceRoute", "UserManager/resource/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("UserManager_ResourceImageRoute", "UserManager/images/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index", resourcePath = "images" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute(
                "UserManager_default",
                "UserManager/{controller}/{action}/{id}",
                new { action = "Index", controller = "Home", id = UrlParameter.Optional }
                );

            //var assemblyName = Assembly.GetAssembly(this.GetType()).FullName;

            //var generalModuleDefId = ModelServices.RegisterPortableAreaModule(AreaName, assemblyName, "UserManager");
            //var moduleDefId = ModelServices.AddModuleToPortal(generalModuleDefId, 0);
            //ModelServices.AddModuleToPage(moduleDefId, 180, "Available Packages", false);

            //generalModuleDefId = ModelServices.RegisterPortableAreaModule(AreaName, assemblyName, "Updates");
            //moduleDefId = ModelServices.AddModuleToPortal(generalModuleDefId, 0);
            //ModelServices.AddModuleToPage(moduleDefId, 180, "Package Updates", false);


            RegisterAreaEmbeddedResources();
            PortableAreaUtils.RegisterScripts(this, context, bus);
        }
Exemplo n.º 2
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("Password_ResourceRoute", "Password/resource/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("Password_ResourceImageRoute", "Password/images/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index", resourcePath = "images" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute(
                "Password_default",
                "Password/{controller}/{action}/{id}",
                new { action = "Index", controller = "ForgotPassword", id = UrlParameter.Optional, area = AreaName }
                );

            this.RegisterAreaEmbeddedResources();
            PortableAreaUtils.RegisterScripts(this, context, bus);
        }
Exemplo n.º 3
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("ASProxy_ResourceRoute", "ASProxy/resource/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("ASProxy_ResourceImageRoute", "ASProxy/images/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index", resourcePath = "images" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("ASProxy.Core_ResourceScriptRoute", "ASProxy/scripts/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index", resourcePath = "Scripts" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute(
                "ASProxy_default",
                "ASProxy/{controller}/{action}/{id}/{*path}",
                new { action = "Index", controller = "Proxy", id = UrlParameter.Optional }
                );

            //var route = new Route(
            //    "Proxy/{proxyId}/{*path}",
            //    new RouteValueDictionary { { "area", "Proxy" }, { "controller", "Proxy" }, { "action", "Index" } },
            //    new RouteValueDictionary(),
            //    new RouteValueDictionary { { "area", "Proxy" } },
            //    new MvcRouteHandler()
            //);
            //route.DataTokens.Add("IgnoreJSON", true);

            //return new[] {
            //    new RouteDescriptor {
            //        Priority = 5,
            //        Route = route
            //    }
            //};

            this.RegisterAreaEmbeddedResources();
            PortableAreaUtils.RegisterScripts(this, context, bus);
        }
Exemplo n.º 4
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("ASMemberRegistrationRequests_ResourceRoute", "ASMemberRegistrationRequests/resource/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("ASMemberRegistrationRequests_ResourceImageRoute", "ASMemberRegistrationRequests/images/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index", resourcePath = "images" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute("ASMemberRegistrationRequests.Core_ResourceScriptRoute", "ASMemberRegistrationRequests/scripts/{resourceName}",
                             new { controller = "EmbeddedResource", action = "Index", resourcePath = "Scripts" },
                             new string[] { "MvcContrib.PortableAreas" });

            context.MapRoute(
                "ASMemberRegistrationRequests_default",
                "ASMemberRegistrationRequests/{controller}/{action}/{id}/{*path}",
                new { action = "Index", controller = "MemberRegistrationRequests", id = UrlParameter.Optional }
                );

            this.RegisterAreaEmbeddedResources();
            PortableAreaUtils.RegisterScripts(this, context, bus);
        }