本文整理汇总了C#中System.Web.Mvc.AreaRegistrationContext.MapLocalizedRoute方法的典型用法代码示例。如果您正苦于以下问题:C# AreaRegistrationContext.MapLocalizedRoute方法的具体用法?C# AreaRegistrationContext.MapLocalizedRoute怎么用?C# AreaRegistrationContext.MapLocalizedRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Mvc.AreaRegistrationContext
的用法示例。
在下文中一共展示了AreaRegistrationContext.MapLocalizedRoute方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
var culture = StrixPlatform.DefaultCultureCode.ToLower();
context.Routes.MapRoute(
"SecureFiles",
"Content/Uploads/Secure/{*url}",
new { controller = "File", action = "GetFile", type = "Uploads", url = UrlParameter.Optional });
context.Routes.MapRoute(
"SecureThumbs",
"Content/Thumbs/Secure/{*url}",
new { controller = "File", action = "GetFile", type = "Thumbs", url = UrlParameter.Optional });
context.Routes.MapLocalizedRoute(
"CheckName",
"{language}/{controller}/CheckName/{name}/{entityId}",
new { language = culture, controller = "Home", action = "CheckName", name = UrlParameter.Optional, entityId = UrlParameter.Optional });
context.Routes.MapRoute(
"Images",
"Image/{width}/{height}/{*url}",
new { controller = "File", action = "GetImage", type = "Thumbs", width = UrlParameter.Optional, height = UrlParameter.Optional, url = UrlParameter.Optional });
context.MapLocalizedRoute(
"EntityAction",
"{language}/Admin/Cms/EntityAction/{action}/{id}",
new { language = culture, controller = "EntityAction", action = MvcConstants.INDEX, id = UrlParameter.Optional });
context.MapLocalizedRoute(
"Versioning",
"{language}/Admin/Version/{action}/{id}",
new { language = culture, controller = "Version", action = MvcConstants.INDEX, id = UrlParameter.Optional });
context.MapLocalizedRoute(
name: "Cms_Default",
url: "{language}/Admin/Cms/{controller}/{action}/{id}",
defaults: new { language = culture, controller = "Home", action = "Index", id = UrlParameter.Optional });
}
示例2: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
if (context == null)
{
throw new ArgumentNullException("context");
}
var culture = StrixPlatform.DefaultCultureCode.ToLower();
context.MapLocalizedRoute(
LoggingConstants.LOGGING,
"{language}/Admin/Logging/{controller}/{action}/{id}",
new { language = culture, controller = LoggingConstants.LOGGING, action = MvcConstants.INDEX, id = UrlParameter.Optional });
}
示例3: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
if (context == null)
{
throw new ArgumentNullException("context");
}
var culture = StrixPlatform.DefaultCultureCode.ToLower();
context.MapLocalizedRoute(
"Account_ResetLink",
"{language}/Account/SendPasswordLink/{userId}",
new { language = culture, controller = MembershipConstants.ACCOUNT, action = "SendPasswordLink", key = UrlParameter.Optional });
context.MapLocalizedRoute(
"Account_Default",
"{language}/Account/{action}/{key}",
new { language = culture, controller = MembershipConstants.ACCOUNT, action = MvcConstants.INDEX, key = UrlParameter.Optional });
context.MapLocalizedRoute(
"Membership_admin",
"{language}/Admin/Membership/{controller}/{action}/{id}",
new { language = culture, controller = "Base", action = MvcConstants.INDEX, id = UrlParameter.Optional });
}