using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Blog.Web
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapRoute(
                 name: "File",
                 url: "File/{action}/{id}",
                 defaults: new { controller = "File", action = "Index", id = UrlParameter.Optional }
             );
            routes.MapRoute(
                name: "Article",
                url: "Article/{action}/{id}",
                defaults: new { controller = "Article", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "gl",
                url: "gl/{action}/{id}",
                defaults: new { controller = "Manger", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                  name: "ArticleList",
                  url: "{Category}/Articles/{Page}",
                  defaults: new { controller = "Home", action = "Articles", Category = UrlParameter.Optional, Page = UrlParameter.Optional }
              );
            routes.MapRoute(
                name: "Home",
                url: "{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}
