本文整理汇总了C#中System.Web.Mvc.AreaRegistrationContext.MapSubdomainRoute方法的典型用法代码示例。如果您正苦于以下问题:C# AreaRegistrationContext.MapSubdomainRoute方法的具体用法?C# AreaRegistrationContext.MapSubdomainRoute怎么用?C# AreaRegistrationContext.MapSubdomainRoute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Mvc.AreaRegistrationContext
的用法示例。
在下文中一共展示了AreaRegistrationContext.MapSubdomainRoute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Error.Http404", // Route name
new List<string>() { "*", "error" }, // Subdomains
new List<string>() { config.Host }, // domains
"404", // URL with parameters
new { controller = "Error", action = "Http404" }, // Parameter defaults
new[] { typeof(Controllers.ErrorController).Namespace }
);
context.MapSubdomainRoute(
"Error.Http403", // Route name
new List<string>() { "*", "error" }, // Subdomains
new List<string>() { config.Host }, // domains
"403", // URL with parameters
new { controller = "Error", action = "Http403" }, // Parameter defaults
new[] { typeof(Controllers.ErrorController).Namespace }
);
context.MapSubdomainRoute(
"Error.Http500", // Route name
new List<string>() { "*", "error" }, // Subdomains
new List<string>() { config.Host }, // domains
"500", // URL with parameters
new { controller = "Error", action = "Http500" }, // Parameter defaults
new[] { typeof(Controllers.ErrorController).Namespace }
);
}
示例2: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Shortener.Index", // Route name
new List<string>() { "shorten", "s" }, // Subdomains
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Shortener", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.ShortenerController).Namespace }
);
context.MapSubdomainRoute(
"Shortener.Action", // Route name
new List<string>() { "shorten", "s" }, // Subdomains
new List<string>() { config.Host }, // domains
"Action/{action}", // URL with parameters
new { controller = "Shortener", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.ShortenerController).Namespace }
);
context.MapSubdomainRoute(
"Shortener.View", // Route name
new List<string>() { string.Empty, "shortened" }, // Subdomains
new List<string>() { config.ShortenerConfig.ShortenerHost }, // domains
"{url}", // URL with parameters
new { controller = "Shortener", action = "RedirectToUrl" }, // Parameter defaults
new[] { typeof(Controllers.ShortenerController).Namespace }
);
// Register Script Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/shortener", config.CdnHost).Include(
"~/Areas/Shortener/Scripts/Shortener.js"));
}
示例3: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"RSS.Index", // Route name
new List<string>() { "rss" },
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "RSS", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.RSSController).Namespace }
);
context.MapSubdomainRoute(
"RSS.Blog", // Route name
new List<string>() { "rss" },
new List<string>() { config.Host }, // domains
"Blog/{username}", // URL with parameters
new { controller = "RSS", action = "Blog", username = UrlParameter.Optional }, // Parameter defaults
new[] { typeof(Controllers.RSSController).Namespace }
);
context.MapSubdomainRoute(
"RSS.Podcast", // Route name
new List<string>() { "rss" },
new List<string>() { config.Host }, // domains
"Podcast", // URL with parameters
new { controller = "RSS", action = "Podcast" }, // Parameter defaults
new[] { typeof(Controllers.RSSController).Namespace }
);
}
示例4: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Blog.Blog", // Route name
new List<string>() { "blog" }, // Subdomains
new List<string>() { config.Host },
"{username}", // URL with parameters
new { controller = "Blog", action = "Blog", username = string.Empty }, // Parameter defaults
new[] { typeof(Controllers.BlogController).Namespace }
);
context.MapSubdomainRoute(
"Blog.New", // Route name
new List<string>() { "blog" }, // Subdomains
new List<string>() { config.Host },
"{username}/New", // URL with parameters
new { controller = "Blog", action = "NewPost", username = "" }, // Parameter defaults
new[] { typeof(Controllers.BlogController).Namespace }
);
context.MapSubdomainRoute(
"Blog.Edit", // Route name
new List<string>() { "blog" }, // Subdomains
new List<string>() { config.Host },
"{username}/Edit/{id}", // URL with parameters
new { controller = "Blog", action = "EditPost", username = "", id = 0 }, // Parameter defaults
new[] { typeof(Controllers.BlogController).Namespace }
);
context.MapSubdomainRoute(
"Blog.Post", // Route name
new List<string>() { "blog" }, // Subdomains
new List<string>() { config.Host },
"{username}/p/{id}", // URL with parameters
new { controller = "Blog", action = "Post", username = "", id = 0 }, // Parameter defaults
new[] { typeof(Controllers.BlogController).Namespace }
);
context.MapSubdomainRoute(
"Blog.Action", // Route name
new List<string>() { "blog" }, // Subdomains
new List<string>() { config.Host },
"Action/{controller}/{action}", // URL with parameters
new { controller = "Blog", action = "Blog" }, // Parameter defaults
new[] { typeof(Controllers.BlogController).Namespace }
);
// Register Script Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/blog", config.CdnHost).Include(
"~/Scripts/bootbox/bootbox.min.js",
"~/Scripts/MarkdownDeepLib.min.js",
"~/Areas/Blog/Scripts/Blog.js"));
// Register Style Bundles
BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/blog", config.CdnHost).Include(
"~/Content/mdd_styles.css",
"~/Areas/Blog/Content/Blog.css"));
}
示例5: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
#region API v1
// Base Routing
context.MapSubdomainRoute(
"API.v1.Index", // Route name
new List<string>() { "api" },
new List<string>() { config.Host },
"v1", // URL with parameters
new { controller = "APIv1", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.APIv1Controller).Namespace }
);
// Uploads
context.MapSubdomainRoute(
"API.v1.Upload", // Route name
new List<string>() { "api" },
new List<string>() { config.Host },
"v1/Upload", // URL with parameters
new { controller = "APIv1", action = "Upload" }, // Parameter defaults
new[] { typeof(Controllers.APIv1Controller).Namespace }
);
// Pastes
context.MapSubdomainRoute(
"API.v1.Paste", // Route name
new List<string>() { "api" },
new List<string>() { config.Host },
"v1/Paste", // URL with parameters
new { controller = "APIv1", action = "Paste" }, // Parameter defaults
new[] { typeof(Controllers.APIv1Controller).Namespace }
);
// Url Shortening
context.MapSubdomainRoute(
"API.v1.Shortener", // Route name
new List<string>() { "api" },
new List<string>() { config.Host },
"v1/Shorten", // URL with parameters
new { controller = "APIv1", action = "Shorten" }, // Parameter defaults
new[] { typeof(Controllers.APIv1Controller).Namespace }
);
#endregion
// Default Routing
context.MapSubdomainRoute(
"API.Index", // Route name
new List<string>() { "api" },
new List<string>() { config.Host },
"", // URL with parameters
new { controller = "API", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.APIController).Namespace }
);
}
示例6: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
// Default Routes to be applied everywhere
context.MapSubdomainRoute(
"Default.Favicon", // Route name
new List<string>() { "*" }, // Subdomains
new List<string>() { config.Host, config.ShortenerConfig.ShortenerHost }, // domains
"favicon.ico", // URL with parameters
new { controller = "Default", action = "Favicon" }, // Parameter defaults
new[] { typeof(DefaultController).Namespace }
);
// Default Routes to be applied everywhere
context.MapSubdomainRoute(
"Default.Logo", // Route name
new List<string>() { "*" }, // Subdomains
new List<string>() { config.Host, config.ShortenerConfig.ShortenerHost }, // domains
"Logo", // URL with parameters
new { controller = "Default", action = "Logo" }, // Parameter defaults
new[] { typeof(DefaultController).Namespace }
);
// Register fallback for all bad requests
context.MapSubdomainRoute(
"Default.NotFound", // Route name
new List<string>() { "*" }, // Subdomains
new List<string>() { config.Host }, // domains
"{url}", // URL with parameters
new { controller = "Default", action = "NotFound" }, // Parameter defaults
new { url = "{*url}" },
new[] { typeof(DefaultController).Namespace }
);
context.MapSubdomainRoute(
"Home.Index", // Route name
new List<string>() { "www", string.Empty }, // Subdomains
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Home", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.HomeController).Namespace }
);
// Register Style Bundles
BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/home", config.CdnHost).Include(
"~/Areas/Home/Content/Home.css"));
}
示例7: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Podcast.Index", // Route name
new List<string>() { "podcast" }, // Subdomains
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Podcast", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.PodcastController).Namespace }
);
context.MapSubdomainRoute(
"Podcast.View", // Route name
new List<string>() { "podcast" }, // Subdomains
new List<string>() { config.Host }, // domains
"{episode}", // URL with parameters
new { controller = "Podcast", action = "View" }, // Parameter defaults
new[] { typeof(Controllers.PodcastController).Namespace }
);
context.MapSubdomainRoute(
"Podcast.Download", // Route name
new List<string>() { "podcast" }, // Subdomains
new List<string>() { config.Host }, // domains
"File/{episode}/{fileName}", // URL with parameters
new { controller = "Podcast", action = "Download" }, // Parameter defaults
new[] { typeof(Controllers.PodcastController).Namespace }
);
context.MapSubdomainRoute(
"Podcast.Action", // Route name
new List<string>() { "podcast" }, // Subdomains
new List<string>() { config.Host }, // domains
"Action/{controller}/{action}", // URL with parameters
new { controller = "Podcast", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.PodcastController).Namespace }
);
// Register Script Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/podcast", config.CdnHost).Include(
"~/Scripts/bootbox/bootbox.min.js",
"~/Scripts/jquery.blockUI.js",
"~/Areas/Podcast/Scripts/Podcast.js"));
// Register Style Bundles
BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/podcast", config.CdnHost).Include(
"~/Areas/Podcast/Content/Podcast.css"));
}
示例8: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Stream.Index", // Route name
new List<string>() { "stream" }, // Subdomains
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Stream", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.StreamController).Namespace }
);
context.MapSubdomainRoute(
"Stream.View", // Route name
new List<string>() { "stream" }, // Subdomains
new List<string>() { config.Host }, // domains
"Stream/{id}", // URL with parameters
new { controller = "Stream", action = "ViewStream" }, // Parameter defaults
new[] { typeof(Controllers.StreamController).Namespace }
);
}
示例9: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"About.Index", // Route name
new List<string>() { "about" },
new List<string>() { config.Host },
"", // URL with parameters
new { controller = "About", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.AboutController).Namespace }
);
}
示例10: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Admin.Dashboard", // Route name
new List<string>() { "admin" }, // Subdomains
new List<string>() { config.Host },
"", // URL with parameters
new { controller = "Admin", action = "Dashboard" }, // Parameter defaults
new[] { typeof(Controllers.AdminController).Namespace }
);
context.MapSubdomainRoute(
"Admin.Search", // Route name
new List<string>() { "admin" }, // Subdomains
new List<string>() { config.Host },
"Search", // URL with parameters
new { controller = "Admin", action = "Search" }, // Parameter defaults
new[] { typeof(Controllers.AdminController).Namespace }
);
context.MapSubdomainRoute(
"Admin.UserInfo", // Route name
new List<string>() { "admin" }, // Subdomains
new List<string>() { config.Host },
"User/{username}", // URL with parameters
new { controller = "Admin", action = "UserInfo", username = string.Empty }, // Parameter defaults
new[] { typeof(Controllers.AdminController).Namespace }
);
context.MapSubdomainRoute(
"Admin.Action", // Route name
new List<string>() { "admin" }, // Subdomains
new List<string>() { config.Host },
"Action/{controller}/{action}", // URL with parameters
new { controller = "Admin", action = "Dashboard" }, // Parameter defaults
new[] { typeof(Controllers.AdminController).Namespace }
);
// Register Script Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/Search", config.CdnHost).Include(
"~/Areas/Admin/Scripts/Search.js"));
}
示例11: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Contact.Index", // Route name
new List<string>() { "contact" }, // Subdomains
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Contact", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.ContactController).Namespace }
);
context.MapSubdomainRoute(
"Contact.Action", // Route name
new List<string>() { "contact" }, // Subdomains
new List<string>() { config.Host }, // domains
"{action}", // URL with parameters
new { controller = "Contact", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.ContactController).Namespace }
);
// Register Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/contact", config.CdnHost).Include(
"~/Areas/Contact/Scripts/Contact.js"));
}
示例12: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Vault.Index",
new List<string>() { "vault", "v" }, // Subdomains
new List<string>() { config.Host }, // domains
"",
new { controller = "Vault", action = "Index" },
new[] { typeof(Controllers.VaultController).Namespace }
);
// Register Script Bundle
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/vault", config.CdnHost).Include(
"~/Areas/Vault/Scripts/Vault.js"));
}
示例13: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Help.Index", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Help", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.API", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"API/{version}/{service}", // URL with parameters
new { controller = "Help", action = "API", version = UrlParameter.Optional, service = UrlParameter.Optional }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Blog", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Blog", // URL with parameters
new { controller = "Help", action = "Blog" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Git", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Git", // URL with parameters
new { controller = "Help", action = "Git" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.IRC", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"IRC", // URL with parameters
new { controller = "Help", action = "IRC" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Mail", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Mail", // URL with parameters
new { controller = "Help", action = "Mail" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Markdown", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Markdown", // URL with parameters
new { controller = "Help", action = "Markdown" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Mumble", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Mumble", // URL with parameters
new { controller = "Help", action = "Mumble" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.RSS", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"RSS", // URL with parameters
new { controller = "Help", action = "RSS" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Tools", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Tools", // URL with parameters
new { controller = "Help", action = "Tools" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
context.MapSubdomainRoute(
"Help.Upload", // Route name
new List<string>() { "help" }, // Subdomains
new List<string>() { config.Host }, // domains
"Upload", // URL with parameters
new { controller = "Help", action = "Upload" }, // Parameter defaults
new[] { typeof(Controllers.HelpController).Namespace }
);
// Register Style Bundles
BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/help", config.CdnHost).Include(
"~/Areas/Help/Content/Help.css"));
}
示例14: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Upload.Index",
new List<string>() { "upload", "u" }, // Subdomains
new List<string>() { config.Host }, // domains
"",
new { controller = "Upload", action = "Index" },
new[] { typeof(Controllers.UploadController).Namespace }
);
context.MapSubdomainRoute(
"Upload.Favicon",
new List<string>() { "upload", "u" }, // Subdomains
new List<string>() { config.Host }, // domains
"favicon.ico",
new { controller = "Default", action = "Favicon" },
new[] { typeof(DefaultController).Namespace }
);
context.MapSubdomainRoute(
"Upload.Download",
new List<string>() { "upload", "u" }, // Subdomains
new List<string>() { config.Host }, // domains
"{file}",
new { controller = "Upload", action = "Download", file = string.Empty },
new[] { typeof(Controllers.UploadController).Namespace }
);
context.MapSubdomainRoute(
"Upload.Delete",
new List<string>() { "upload", "u" }, // Subdomains
new List<string>() { config.Host }, // domains
"{file}/{key}",
new { controller = "Upload", action = "Delete", file = string.Empty, key = string.Empty },
new[] { typeof(Controllers.UploadController).Namespace }
);
context.MapSubdomainRoute(
"Upload.Action",
new List<string>() { "upload", "u" }, // Subdomains
new List<string>() { config.Host }, // domains
"Action/{controller}/{action}",
new { controller = "Upload", action = "Index" },
new[] { typeof(Controllers.UploadController).Namespace }
);
// Register Script Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/upload", config.CdnHost).Include(
"~/Scripts/Dropzone/dropzone.js",
"~/Areas/Upload/Scripts/Upload.js",
"~/Scripts/bootstrap-switch.js",
"~/Scripts/bootbox/bootbox.min.js"));
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/download", config.CdnHost).Include(
"~/Scripts/Blob.js",
"~/Scripts/FileSaver.js",
"~/Areas/Upload/Scripts/Download.js"));
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/cryptoWorker", config.CdnHost).Include(
"~/Areas/Upload/Scripts/EncryptionWorker.js"));
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/crypto", config.CdnHost).Include(
"~/Scripts/Crypto-js/aes.js",
"~/Scripts/Crypto-js/enc-base64.js",
"~/Scripts/Crypto-js/mode-ctr.js",
"~/Scripts/Crypto-js/lib-typedarrays.js",
"~/Scripts/Crypto-js/pad-nopadding.js"));
// Register Style Bundles
BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/upload", config.CdnHost).Include(
"~/Content/dropzone.css",
"~/Content/bootstrap-switch/bootstrap3/bootstrap-switch.css",
"~/Areas/Upload/Content/Upload.css"));
}
示例15: RegisterArea
public override void RegisterArea(AreaRegistrationContext context)
{
Config config = Config.Load();
context.MapSubdomainRoute(
"Paste.Index", // Route name
new List<string>() { "paste", "p" },
new List<string>() { config.Host }, // domains
"", // URL with parameters
new { controller = "Paste", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.PasteController).Namespace }
);
context.MapSubdomainRoute(
"Paste.Favicon",
new List<string>() { "paste", "p" }, // Subdomains
new List<string>() { config.Host }, // domains
"favicon.ico",
new { controller = "Default", action = "Favicon" },
new[] { typeof(DefaultController).Namespace }
);
context.MapSubdomainRoute(
"Paste.Simple", // Route name
new List<string>() { "paste", "p" },
new List<string>() { config.Host }, // domains
"Simple/{url}", // URL with parameters
new { controller = "Paste", action = "ViewPaste", type = "Simple" }, // Parameter defaults
new[] { typeof(Controllers.PasteController).Namespace }
);
context.MapSubdomainRoute(
"Paste.Raw", // Route name
new List<string>() { "paste", "p" },
new List<string>() { config.Host }, // domains
"Raw/{url}", // URL with parameters
new { controller = "Paste", action = "ViewPaste", type = "Raw" }, // Parameter defaults
new[] { typeof(Controllers.PasteController).Namespace }
);
context.MapSubdomainRoute(
"Paste.Download", // Route name
new List<string>() { "paste", "p" },
new List<string>() { config.Host }, // domains
"Download/{url}", // URL with parameters
new { controller = "Paste", action = "ViewPaste", type = "Download" }, // Parameter defaults
new[] { typeof(Controllers.PasteController).Namespace }
);
context.MapSubdomainRoute(
"Paste.Action", // Route name
new List<string>() { "paste", "p" },
new List<string>() { config.Host }, // domains
"Action/{action}", // URL with parameters
new { controller = "Paste", action = "Index" }, // Parameter defaults
new[] { typeof(Controllers.PasteController).Namespace }
);
context.MapSubdomainRoute(
"Paste.View", // Route name
new List<string>() { "paste", "p" },
new List<string>() { config.Host }, // domains
"{url}", // URL with parameters
new { controller = "Paste", action = "ViewPaste", type = "Full" }, // Parameter defaults
new[] { typeof(Controllers.PasteController).Namespace }
);
// Register Script Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/paste", config.CdnHost).Include(
"~/Scripts/Highlight/highlight.pack.js",
"~/Areas/Paste/Scripts/Paste.js"));
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/syntaxWorker", config.CdnHost).Include(
"~/Areas/Paste/Scripts/SyntaxWorker.js"));
BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/highlight", config.CdnHost).Include(
"~/Scripts/Highlight/highlight.pack.js"));
// Register Style Bundles
BundleTable.Bundles.Add(new CdnScriptBundle("~/Content/paste", config.CdnHost).Include(
"~/Content/Highlight/github-gist.css",
"~/Areas/Paste/Content/Paste.css"));
}