当前位置: 首页>>代码示例>>C#>>正文


C# AreaRegistrationContext.MapRootRoute方法代码示例

本文整理汇总了C#中System.Web.Mvc.AreaRegistrationContext.MapRootRoute方法的典型用法代码示例。如果您正苦于以下问题:C# AreaRegistrationContext.MapRootRoute方法的具体用法?C# AreaRegistrationContext.MapRootRoute怎么用?C# AreaRegistrationContext.MapRootRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.Mvc.AreaRegistrationContext的用法示例。


在下文中一共展示了AreaRegistrationContext.MapRootRoute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRouteArea("", Root, MVC.LieDetectorOrThief.LikelyThief.Index());
            context.MapRootRoute("", "likelythieves/add", MVC.LieDetectorOrThief.LikelyThief.AddLikelyThief(), Root);
            context.MapRootRoute("", "likelythieves/{likelyThiefIdNumericPart}", MVC.LieDetectorOrThief.LikelyThief.GetLikelyThief(), Root);
            context.MapRootRoute("", "likelythieves/{likelyThiefIdNumericPart}/edit", MVC.LieDetectorOrThief.LikelyThief.EditLikelyThief(), Root);
            context.MapRootRoute("", "likelythieves/{likelyThiefIdNumericPart}/accept", MVC.LieDetectorOrThief.LikelyThief.SwitchLikelyThiefStatus(), Root);

            context.MapRoute(
                "LieDetectorOrThief_default",
                "LieDetectorOrThief/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
            );
        }
开发者ID:alexidsa,项目名称:civildoit,代码行数:14,代码来源:LieDetectorOrThiefAreaRegistration.cs

示例2: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute("", Root, MVC.Drugs.Home1.Index());

            var lawRouteServiceFactory = DependencyResolver.Current.GetService<LawRouteServiceFactory>();
            var gamblingLawRouteService = lawRouteServiceFactory.GetLawRouteService(Root, AreaName);
            context.MapRoutes(gamblingLawRouteService.RoutePairs);

            context.MapRootRoute("", "{cityAlias}", MVC.Drugs.SalePoint.GetSalePoints(), Root);
            context.MapRootRoute("", "{cityAlias}/commentsfeed", MVC.Drugs.SalePoint.GetCommentsFeed(), Root);
            context.MapRootRoute("", "{cityAlias}/salepoints/add", MVC.Drugs.SalePoint.AddSalePoint(), Root);
            context.MapRootRoute("", "{cityAlias}/salepoints/{salePointIdNumericPart}", MVC.Drugs.SalePoint.GetSalePoint(), Root);
            
            context.MapRootRoute("", "[0]/{controller}/{action}/{id}", new { id = UrlParameter.Optional }, Root);
        }
开发者ID:alexidsa,项目名称:civildoit,代码行数:15,代码来源:DrugsAreaRegistration.cs

示例3: RegisterArea

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute("", Root, MVC.Gambling.Home1.Index());

            var lawRouteServiceFactory = DependencyResolver.Current.GetService<LawRouteServiceFactory>();
            var gamblingLawRouteService = lawRouteServiceFactory.GetLawRouteService(Root, AreaName);
            context.MapRoutes(gamblingLawRouteService.RoutePairs);

            context.MapRootRoute("", "addcity", MVC.Gambling.City.AddCity(), Root);

            context.MapRootRoute("", "{cityAlias}", MVC.Gambling.Casino.GetCasinos(), Root);
            context.MapRootRoute("", "{cityAlias}/suspensionsfeed", MVC.Gambling.Casino.GetSuspensionsFeed(), Root);
            context.MapRootRoute("", "{cityAlias}/commentsfeed", MVC.Gambling.Casino.GetCommentsFeed(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/rss", MVC.Gambling.Casino.Rss(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/add", MVC.Gambling.Casino.AddCasino(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/{casinoIdNumericPart}", MVC.Gambling.Casino.GetCasino(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/{casinoIdNumericPart}/delete", MVC.Gambling.Casino.DeleteCasino(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/{casinoIdNumericPart}/edit", MVC.Gambling.Casino.EditCasino(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/{casinoIdNumericPart}/switchstatus", MVC.Gambling.Casino.SwitchCasinoStatus(), Root);
            context.MapRootRoute("", "{cityAlias}/casinos/{casinoIdNumericPart}/addsuspension", MVC.Gambling.Casino.AddSuspension(), Root);

            context.MapRootRoute("", "{cityAlias}/witnesses/add", MVC.Gambling.CitizenForm.AddWitness(), Root);
            context.MapRootRoute("", "{cityAlias}/witnesses", MVC.Gambling.CitizenForm.GetWitnesses(), Root);
            context.MapRootRoute("", "{cityAlias}/confidential/add", MVC.Gambling.CitizenForm.AddConfidentialInformation(), Root);
            context.MapRootRoute("", "{cityAlias}/confidential", MVC.Gambling.CitizenForm.GetConfidentialInformations(), Root);

            context.MapRootRoute("", "{controller}/{action}/{id}", new { id = UrlParameter.Optional }, Root);
        }
开发者ID:alexidsa,项目名称:civildoit,代码行数:28,代码来源:GamblingAreaRegistration.cs


注:本文中的System.Web.Mvc.AreaRegistrationContext.MapRootRoute方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。