コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }