forked from Teknikode/Teknik
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.8 KiB
65 lines
2.8 KiB
using System.Collections.Generic; |
|
using System.Web.Mvc; |
|
using System.Web.Optimization; |
|
using Teknik.Configuration; |
|
using Teknik.Helpers; |
|
|
|
namespace Teknik.Areas.Podcast |
|
{ |
|
public class PodcastAreaRegistration : AreaRegistration |
|
{ |
|
public override string AreaName |
|
{ |
|
get |
|
{ |
|
return "Podcast"; |
|
} |
|
} |
|
|
|
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 |
|
"ep/{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")); |
|
} |
|
} |
|
} |