コード例 #1
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);

            context.MapRoute(
                AreaName + "_scripts",
                base.AreaRoutePrefix + "/Scripts/{resourceName}",
                new { controller = "EmbeddedResource", action = "Index", resourcePath = "scripts" },
                new[] { "Qi.CRM.Plugin" }
                );

            context.MapRoute(
                AreaName + "_images",
                base.AreaRoutePrefix + "/images/{resourceName}",
                new { controller = "EmbeddedResource", action = "Index", resourcePath = "images" },
                new[] { "Qi.CRM.Plugin" }
                );

            context.MapRoute(
                AreaName + "_default",
                base.AreaRoutePrefix + "/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                new[] { "Qi.CRM.Plugin.Areas.CRM.Controllers", "MvcContrib" }
                );

            //RegisterEmbeddedViewEngine();
        }
コード例 #2
0
ファイル: MvcRegistration.cs プロジェクト: Soloyuan/Zen
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            //嵌入资源
            context.MapRoute(
                name: AreaName + "_ResourceRoute",
                url: AreaName + "/resource/{resourceName}",
                defaults: new { controller = "EmbeddedResource", action = "Index" },
                namespaces: new[] { "MvcContrib.PortableAreas" }
                );

            //Js脚本
            context.MapRoute(
                name: AreaName + "_Scripts",
                url: AreaName + "/Scripts/{resourceName}",
                defaults: new { controller = "EmbeddedResource", action = "Index", resourcePath = "Scripts" },
                namespaces: new[] { "MvcContrib.PortableAreas" }
                );

            //Styles脚本
            context.MapRoute(
                name: AreaName + "_Styles",
                url: AreaName + "/Styles/{resourceName}",
                defaults: new { controller = "EmbeddedResource", action = "Index", resourcePath = "Styles" },
                namespaces: new[] { "MvcContrib.PortableAreas" }
                );


            //View
            context.MapRoute(
                name: AreaName + "_Default",
                url: AreaName + "/{controller}/{action}"
                );
            RegisterAreaEmbeddedResources();
        }
コード例 #3
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            var currentState = (PortableAreaUtils.RegistrationState)Enum.Parse(typeof(PortableAreaUtils.RegistrationState), context.State.ToString());

            if (currentState == PortableAreaUtils.RegistrationState.Initializing) {
                context.MapRoute("Appleseed.Core_ResourceRoute", "Appleseed.Core/resource/{resourceName}",
                   new { controller = "EmbeddedResource", action = "Index" },
                   new string[] { "MvcContrib.PortableAreas" });

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

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

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

                RegisterAreaEmbeddedResources();
                PortableAreaUtils.RegisterScripts(this, context, bus);
            }
        }
コード例 #4
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("PortableAreaMvc3_ResourceRoute", "FileManager/resource/{resourceName}",
               new { controller = "EmbeddedResource", action = "Index" },
               new string[] { "MvcContrib.PortableAreas" });

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

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

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

            //var generalModuleDefId = ModelServices.RegisterPortableAreaModule(AreaName, assemblyName, "Home");
            //var modDef =  ModelServices.AddModuleToPortal(generalModuleDefId, 0);
            //ModelServices.AddModuleToPage(modDef, 155, "FileManager", false);

            this.RegisterAreaEmbeddedResources();
            PortableAreaUtils.RegisterScripts(this, context, bus);
        }
コード例 #5
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     //Resource
     context.MapRoute(
         "ResourceRoute",
         base.AreaRoutePrefix + "/resource/{resourceName}",
         new { controller = "EmbeddedResource", action = "Index" },
         new[] { "MvcContrib.PortableAreas" }
         );
     //Scripts
     context.MapRoute(
         AreaName + "_Scripts",
         base.AreaRoutePrefix + "/Scripts/{resourceName}",
         new { controller = "EmbeddedResource", action = "Index", resourcePath = "Scripts" },
         new[] { "MvcContrib.PortableAreas" }
         );
     //Content
     context.MapRoute(
         AreaName + "_Content",
         base.AreaRoutePrefix + "/Content/{resourceName}",
         new { controller = "EmbeddedResource", action = "Index", resourcePath = "Content" },
         new[] { "MvcContrib.PortableAreas" }
         );
     //Default
     context.MapRoute(
         AreaName + "_Default",
         AreaName + "/{controller}/{action}/{id}",
         new { controller = "Home", action = "Index", id = UrlParameter.Optional },
         new[] { "ETong.WebUI.Conponent.Controllers" }
         );
     RegisterAreaEmbeddedResources();
 }
コード例 #6
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);
        }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegisterAreaMessage("Link to the Demo area", AreaName, DefaultController, DefaultAction));

            RegisterRoutes(context);
            RegisterAreaEmbeddedResources();
        }
コード例 #8
0
 protected override void RegisterArea(
     AreaRegistrationContext context,
     IApplicationBus bus,
     PlatformAreaRegistrationState state)
 {
     this.RegisterApplicationRoutes(context);
 }
コード例 #9
0
        private void AddSettingsMenuItem(IApplicationBus bus)
        {
            bus.Send(
                new AddMenuItem
                {
                    MenuItem = new MenuItem
                    {
                        MenuName = "Settings",
                        LinkText = "Logging",
                        ActionName = "Index",
                        ControllerName = "LoggingSettings",
                        AreaName = "Framework",
                        HtmlAttributes = new { data_role = "button" },
                        Position = int.MinValue
                    }
                });

            bus.Send(
                new AddMenuItem
                {
                    MenuItem = new MenuItem
                    {
                        MenuName = "Settings",
                        LinkText = "Caching",
                        ActionName = "Index",
                        ControllerName = "CacheSettings",
                        AreaName = "Framework",
                        HtmlAttributes = new { data_role = "button" },
                        Position = int.MinValue
                    }
                });
        }
コード例 #10
0
 public SingleWebServerApplicationState(ISettings settings, IApplicationBus bus, IDocumentSession docSession, HttpContextBase httpContext)
 {
     this.settings = settings;
     this.bus = bus;
     this.docSession = docSession;
     this.httpContext = httpContext;
 }
コード例 #11
0
        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);

            context.MapRoute("Authorization"
                , "Auth/{action}"
                , new { controller = "Auth", action = "Index" });

            context.MapRoute("AuthorizationResources"
                , "AuthResource/{resourceType}/{resourceName}"
                , new { controller = "AuthResource", action = "GetResource" });

            context.MapRoute("EmbeddedOpenIdResources"
                , "EmbededOpenIdResources/{resourceName}"
                , new { controller = "OpenIdResource", action = "GetOpenIdResource" });

            context.MapRoute("OpenIdResources"
                , "OpenIdResources/{resourceType}/{resourceName}"
                , new { controller = "OpenIdResource", action = "GetResource" });

            context.MapRoute(
                "OpenIdDiscover",
                "Auth/Discover"
            );
        }
コード例 #12
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            var currentState = (PortableAreaUtils.RegistrationState)Enum.Parse(typeof(PortableAreaUtils.RegistrationState), context.State.ToString());

            if (currentState == PortableAreaUtils.RegistrationState.Initializing)
            {
                context.MapRoute("Appleseed.Core_ResourceRoute", "Appleseed.Core/resource/{resourceName}",
                                 new { controller = "EmbeddedResource", action = "Index" },
                                 new string[] { "MvcContrib.PortableAreas" });

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

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

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

                RegisterAreaEmbeddedResources();
                PortableAreaUtils.RegisterScripts(this, context, bus);
            }
        }
コード例 #13
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);

            context.MapRoute(
                AreaName + "_scripts",
                base.AreaRoutePrefix + "/Scripts/{resourceName}",
                new {controller = "EmbeddedResource", action = "Index", resourcePath = "scripts"},
                new[] {"Qi.CRM.Plugin"}
                );

            context.MapRoute(
                AreaName + "_images",
                base.AreaRoutePrefix + "/images/{resourceName}",
                new {controller = "EmbeddedResource", action = "Index", resourcePath = "images"},
                new[] {"Qi.CRM.Plugin"}
                );

            context.MapRoute(
                AreaName + "_default",
                base.AreaRoutePrefix + "/{controller}/{action}/{id}",
                new {action = "Index", id = UrlParameter.Optional},
                new[] {"Qi.CRM.Plugin.Areas.CRM.Controllers", "MvcContrib"}
                );

            //RegisterEmbeddedViewEngine();
        }
コード例 #14
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            // Map embedded resources.
            // NB: Must come before main Area mapping.
            context.MapEmbeddedResource(AreaName, "ResourceContentRoute", AreaName + "/Content/{resourceName}");
            context.MapEmbeddedResource(AreaName, "ResourceImageRoute", AreaName + "/Images/{resourceName}", resourcePath: "Content/Images");
            context.MapEmbeddedResource(AreaName, "ResourceCssRoute", AreaName + "/Css/{resourceName}", resourcePath: "Content/Css");
            context.MapEmbeddedResource(AreaName, "TestHarnessImagesRoute", AreaName + "/TestHarness/Images/{resourceName}", resourcePath: "Content/Images/TestHarness");

            // Script folders:
            context.MapEmbeddedResource(AreaName, "ResourceScriptsRoute", AreaName + "/Scripts/{resourceName}", resourcePath: "Content/Scripts");
            context.MapEmbeddedResource(AreaName, "ResourceScriptsRouteJQuery", AreaName + "/Scripts/JQuery/{resourceName}", resourcePath: "Content/Scripts/JQuery");

            // Map the area.
            context.MapRoute(
                AreaName + "TestHarness",  // Route name
                AreaName,  // URL
                new { controller = TestHarnessController.Name, action = TestHarnessController.ActionPage });

            // Default mapping.
            context.MapRoute(
                AreaName,
                string.Format("{0}/{{controller}}/{{action}}", AreaName));

            // Finish up.
            base.RegisterAreaEmbeddedResources();
        }
コード例 #15
0
 protected void ResgistSeajsFiles(IApplicationBus bus)
 {
     foreach (SeajsModel model in _seajsEmbeddedModulePath)
     {
         string   str      = string.Format("{0}/{1}", _context.AreaName, model.BundleNamee);
         string[] strArray =
             AssemblyResourceManager.GetResourceStoreForArea(_context.AreaName)
             .MatchPath("~/" + model.FilePath, ".js");
         if ((strArray == null) || (strArray.Length == 0))
         {
             throw new FileNotFoundException(string.Format("Not found an embed js file in {0}", str));
         }
         foreach (string str2 in strArray)
         {
             var bundle = new SeajsEmbedBundle(string.Format("~/{0}/{1}", str, str2), _context.AreaName,
                                               OrnamentContext.Configuration.GetSeajsCombine());
             if (model.BundleNamee != model.FilePath)
             {
                 string virtualPath = string.Format("~/areas/{0}/{1}/{2}", _context.AreaName, model.FilePath,
                                                    str2);
                 bundle = (SeajsEmbedBundle)bundle.Include(virtualPath);
             }
             var eventMessage = new SeajsModuleBundleEventMessage(bundle);
             bus.Send(eventMessage);
         }
     }
 }
コード例 #16
0
            public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
            {
                typeof(AreaRegistrationContext)
                        .GetProperty("State")
                        .SetValue(context, new object(), null);

                base.RegisterArea(context, bus);
            }
コード例 #17
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     context.MapRoute(
         "Doc_default",
         "Doc/{controller}/{action}/{id}",
         new {action = "Index", id = UrlParameter.Optional}
         );
 }
コード例 #18
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegisterAreaMessage("Link to the Demo area", AreaName, DefaultController, DefaultAction));

            RegisterRoutes(context);

            RegisterAreaEmbeddedResources();
        }
コード例 #19
0
        public virtual void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new PortableAreaStartupMessage(AreaName));

            RegisterDefaultRoutes(context);

            RegisterAreaEmbeddedResources();
        }
コード例 #20
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     context.MapRoute(
         "RssWidget_default",
         "RssWidget/{controller}/{action}/{id}",
         new {action = "Index", id = ""});
     base.RegisterTheViewsInTheEmbeddedViewEngine(GetType());
 }
コード例 #21
0
public virtual void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
{
    bus.Send(new PortableAreaStartupMessage(AreaName));

            RegisterDefaultRoutes(context);

            RegisterAreaEmbeddedResources();
}
コード例 #22
0
 public ApplicationsController(IApplicationRepository appsStore,
                               Func<IUnitOfWork> uowFactory,
                               IApplicationBus bus)
 {
     _appsStore = appsStore;
     _uowFactory = uowFactory;
     _bus = bus;
 }
コード例 #23
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute("ResourceRoute", "fooarea/resource/{resourceName}",
                             new { controller = "Resource", action = "Index" });


            this.RegisterAreaEmbeddedResources();
        }
コード例 #24
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     context.MapRoute(
         "Doc_default",
         "Doc/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional }
         );
 }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ArtistCharts",
                "ArtistCharts",
                new { controller = "artistcharts", action = "index" });

            RegisterAreaEmbeddedResources();
        }
コード例 #26
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "login",
                "login/{controller}/{action}",
                new {controller = "login", action = "index"});

            base.RegisterTheViewsInTheEmbeddedViewEngine(GetType());
        }
コード例 #27
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     context.MapRoute(
         this.AreaName + "_default",
         this.AreaRoutePrefix + "/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional }
         );
     base.RegisterArea(context, bus);
 }
コード例 #28
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);

            context.MapRoute(
                "Security_Default",
                AreaName + "/{controller}/{action}/{id}",
                new { controller = "Home", action = "Index", id = UrlParameter.Optional });
        }
コード例 #29
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ReleaseDetails",
                "ReleaseDetails",
                new { controller = "releasedetails", action = "index" });

            RegisterAreaEmbeddedResources();
        }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ArtistCharts",
                "ArtistCharts",
                new { controller = "artistcharts", action = "index" });

            RegisterAreaEmbeddedResources();
        }
コード例 #31
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);

            context.MapRoute(
                "CoolComponent_Default",
                AreaName + "/{controller}/{action}/{id}",
                new {controller = "HelloWorld", action = "Index", id = UrlParameter.Optional });
        }
コード例 #32
0
        internal void Bind(IApplicationBus bus)
        {
            if (bus == null)
            {
                throw new ArgumentNullException("bus");
            }

            Bus = bus;
        }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ReleaseDetails",
                "ReleaseDetails",
                new { controller = "releasedetails", action = "index" });

            RegisterAreaEmbeddedResources();
        }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ArtistDetails",
                "ArtistDetails/Index/{artistName}",
                new { controller = "artistdetails", action = "index", artistName = "" });

            RegisterAreaEmbeddedResources();
        }
コード例 #35
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     context.MapRoute(
         AreaName + "_default",
         AreaRoutePrefix + "/{controller}/{action}/{id}",
         new {action = "Index", id = UrlParameter.Optional}
         );
     base.RegisterArea(context, bus);
 }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ArtistDetails",
                "ArtistDetails/Index/{artistName}",
                new { controller = "artistdetails", action = "index", artistName = "" });

            RegisterAreaEmbeddedResources();
        }
コード例 #37
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            RegistApi();
            bus.Send(new NHRegisterEventMessage(typeof(IMemberShipFactory), typeof(MemberShipFactory)));

            //send the init data
            bus.Send(new MemberShipData());
            ResourceSetting.Registry();

            context.MapRoute(
                AreaName + "_images",
                AreaRoutePrefix + "/images/{resourceName}",
                new
            {
                controller   = "OrnamentEmbeddedResource",
                action       = "Index",
                resourcePath = "images"
            },
                new[]
            {
                "Ornament.Web.Controllers"
            }
                );

            //MemberShips/User/Edit/admin
            context.MapRoute(AreaName + "_EditUser",
                             AreaName + "/User/Edit/{loginId}",
                             new { action = "Edit", loginId = UrlParameter.Optional, controller = "User" }
                             );


            context.MapRoute(
                AreaName + "_AssingUser",
                AreaName + "/User/Assign/{loginId}",
                new { action = "Assign", loginId = UrlParameter.Optional, controller = "User" },
                new[] { "Ornament.MemberShip.Plugin.Areas.MemberShips.Controllers" }
                );

            context.MapRoute(
                AreaName + "_default",
                AreaName + "/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                new[] { "Ornament.MemberShip.Plugin.Areas.MemberShips.Controllers" }
                );


            var helper = new AreaRegistrationHelper(this, context);

            helper.RegistSeajsModule("Scripts/User");
            helper.RegistSeajsModule("Scripts/Org");
            helper.RegistSeajsModule("Scripts/Role");
            helper.RegistSeajsModule("Scripts/Share");
            helper.RegistSeajsModule("Scripts/Permissions");

            base.RegisterArea(context, bus);
        }
コード例 #38
0
 public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
 {
     context.MapRoute(
         "Admin_default",
         "Admin/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional },
         new[] { "MVCContribExample.Admin.Controllers" }
         );
     RegisterAreaEmbeddedResources();
 }
コード例 #39
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ItemRegistrationUI_default",
                "{tenant}/" + AreaName + "/{controller}/{action}/{id}",
                new { tenant = "SuperAdmin", controller = "Account", action = "Login", id = UrlParameter.Optional }
                );

            this.RegisterAreaEmbeddedResources();
        }
コード例 #40
0
 protected override void RegisterArea(
     AreaRegistrationContext context,
     IApplicationBus bus,
     PlatformAreaRegistrationState state)
 {
     //this.RequireAuthorizationOnAllActions("framework/admin/view");
     this.RegisterRoutes(context);
     this.AddSettingsMenuItem(bus);
     new AutoMapperConfig().Initialize();
 }
コード例 #41
0
ファイル: SearchRegistration.cs プロジェクト: supermuk/iudico
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "Search",
                "Search/{action}",
                new { controller = "Search" }
            );

            RegisterAreaEmbeddedResources();
        }
コード例 #42
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "Search",
                "Search/{action}",
                new { controller = "Search" }
                );

            RegisterAreaEmbeddedResources();
        }
コード例 #43
0
ファイル: LoginRegistraion.cs プロジェクト: wangchunlei/MyGit
        public override void RegisterArea(System.Web.Mvc.AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegistrationMessage("Registering Login Portable Area"));
            context.MapRoute(
                "login", 
                "login/{controller}/{action}", 
                new { controller = "login", action = "index" });

            this.RegisterAreaEmbeddedResources();
        }
コード例 #44
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegistrationMessage("Registering Login Portable Area"));

            context.MapRoute(
                "login",
                "login/{controller}/{action}",
                new { controller = "login", action = "index" });

            this.RegisterAreaEmbeddedResources();
        }
コード例 #45
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegistrationMessage("Registering Demo Task Portable Area"));

            base.RegisterArea(context, bus);

            context.MapRoute(
                "DemoTask",
                "DemoTask/{controller}/{action}",
                new { controller = "DemoTask", action = "index" });
        }
コード例 #46
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegistrationMessage("Registering Login Portable Area"));

            context.MapRoute(
                "login",
                "login/{controller}/{action}",
                new {controller = "login", action = "index"});

            RegisterTheViewsInTheEmbeddedViewEngine(GetType());
        }
コード例 #47
0
 protected override void RegisterArea(
     AreaRegistrationContext context, 
     IApplicationBus bus, 
     PlatformAreaRegistrationState state)
 {
     context.MapRoute(
         "Content_default",
         "Content/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional }
     );
 }
コード例 #48
0
        public virtual void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            IEnumerable<Type> apiControllers;
            IEnumerable<Type> controllers;
            GetInjectControllers(out controllers, out apiControllers);
            bus.Send(new IocControllerInjectMessageEvent(controllers, apiControllers));

            bus.Send(new PortableAreaStartupMessage(AreaName));

            RegisterAreaEmbeddedResources(bus);
        }
コード例 #49
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegistrationMessage("Registering SketchDevView Portable Area"));

            base.RegisterArea(context, bus);

            context.MapRoute(
                "SketchFixView",
                "SketchFixView/{controller}/{action}",
                new { controller = "SketchFixView", action = "index" });
        }
コード例 #50
0
        public void RegisterAreaEmbeddedResources(IApplicationBus bus)
        {
            Type areaType = GetType();
            var resourceStore = new AssemblyResourceStore(areaType, "/areas/" + AreaName.ToLower(), areaType.Namespace,
                GetMap());
            AssemblyResourceManager.RegisterAreaResources(resourceStore);

            if (EmbedResourceRegisted != null)
            {
                EmbedResourceRegisted(this, new RegistedEmbedresourceEventArgs(bus));
            }
        }
コード例 #51
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            RegistApi();
            bus.Send(new NHRegisterEventMessage(typeof (IMemberShipFactory), typeof (MemberShipFactory)));

            //send the init data
            bus.Send(new MemberShipData());
            ResourceSetting.Registry();

            context.MapRoute(
                AreaName + "_images",
                AreaRoutePrefix + "/images/{resourceName}",
                new
                {
                    controller = "OrnamentEmbeddedResource",
                    action = "Index",
                    resourcePath = "images"
                },
                new[]
                {
                    "Ornament.Web.Controllers"
                }
                );

            //MemberShips/User/Edit/admin
            context.MapRoute(AreaName + "_EditUser",
                AreaName + "/User/Edit/{loginId}",
                new {action = "Edit", loginId = UrlParameter.Optional, controller = "User"}
                );

            context.MapRoute(
                AreaName + "_AssingUser",
                AreaName + "/User/Assign/{loginId}",
                new {action = "Assign", loginId = UrlParameter.Optional, controller = "User"},
                new[] {"Ornament.MemberShip.Plugin.Areas.MemberShips.Controllers"}
                );

            context.MapRoute(
                AreaName + "_default",
                AreaName + "/{controller}/{action}/{id}",
                new {action = "Index", id = UrlParameter.Optional},
                new[] {"Ornament.MemberShip.Plugin.Areas.MemberShips.Controllers"}
                );

            var helper = new AreaRegistrationHelper(this, context);
            helper.RegistSeajsModule("Scripts/User");
            helper.RegistSeajsModule("Scripts/Org");
            helper.RegistSeajsModule("Scripts/Role");
            helper.RegistSeajsModule("Scripts/Share");
            helper.RegistSeajsModule("Scripts/Permissions");

            base.RegisterArea(context, bus);
        }
コード例 #52
0
ファイル: Bus.cs プロジェクト: kouweizhong/MvcContrib
 private static void InitializeTheDefaultBus()
 {
     if(_instance==null)
     {
         lock(_busLock)
         {
             if(_instance==null)
             {
                 _instance = new ApplicationBus(new MessageHandlerFactory());
             }
         }
     }
 }
コード例 #53
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new PortableAreaStartupMessage(AreaName));

            context.MapRoute(
                AreaName + "_default",
                base.AreaRoutePrefix + "/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                new[] { "ED47.Stack.Web.Areas.Multilingual.Controllers", "MvcContrib" }
                );

            RegisterAreaEmbeddedResources();
        }
コード例 #54
0
ファイル: Bus.cs プロジェクト: zoeye/MvcContrib
 private static void InitializeTheDefaultBus()
 {
     if (_instance == null)
     {
         lock (_busLock)
         {
             if (_instance == null)
             {
                 _instance = new ApplicationBus(new MessageHandlerFactory());
             }
         }
     }
 }
コード例 #55
0
        public void RegisterAreaEmbeddedResources(IApplicationBus bus)
        {
            Type areaType      = GetType();
            var  resourceStore = new AssemblyResourceStore(areaType, "/areas/" + AreaName.ToLower(), areaType.Namespace,
                                                           GetMap());

            AssemblyResourceManager.RegisterAreaResources(resourceStore);

            if (EmbedResourceRegisted != null)
            {
                EmbedResourceRegisted(this, new RegistedEmbedresourceEventArgs(bus));
            }
        }
コード例 #56
0
        public virtual void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            IEnumerable <Type> apiControllers;
            IEnumerable <Type> controllers;

            GetInjectControllers(out controllers, out apiControllers);
            bus.Send(new IocControllerInjectMessageEvent(controllers, apiControllers));


            bus.Send(new PortableAreaStartupMessage(AreaName));

            RegisterAreaEmbeddedResources(bus);
        }
コード例 #57
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            bus.Send(new RegistrationMessage("Registering Read Notification Portable Area"));

            base.RegisterArea(context, bus);

            context.MapRoute(
                "ReadNotification",
                "ReadNotification/{controller}/{action}",
                new { controller = "ReadNotification", action = "index" });

            //RegisterTheViewsInTheEmbeddedViewEngine(GetType());
        }
コード例 #58
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "AddToBasket",
                "AddToBasket",
                new { controller = "addtobasket", action = "index", releaseId = UrlParameter.Optional });

            context.MapRoute(
                "Basket",
                "Basket",
                new { controller = "basket", action = "index" });

            RegisterAreaEmbeddedResources();
        }
コード例 #59
0
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            base.RegisterArea(context, bus);
            context.MapRoute(AreaName + "_gymasium",
                             this.AreaRoutePrefix + "/Yard/{action}/{gymasiumId}",
                             new { action = "Index", gymasiumId = UrlParameter.Optional, Controller = "Yard" }
                             );

            context.MapRoute(
                AreaName + "_default",
                AreaRoutePrefix + "/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
                );
        }
        public override void RegisterArea(AreaRegistrationContext context, IApplicationBus bus)
        {
            context.MapRoute(
                "ArtistSearch",
                "ArtistSearch",
                new { controller = "artistsearch", action = "index", query = "" });

            context.MapRoute(
                "ArtistSearchQuery",
                "ArtistSearch/Search",
                new { controller = "artistsearch", action = "search" });

            RegisterAreaEmbeddedResources();
        }