The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
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.

PodcastAreaRegistration.cs 2.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using System.Web.Optimization;
  4. namespace Teknik.Areas.Podcast
  5. {
  6. public class PodcastAreaRegistration : AreaRegistration
  7. {
  8. public override string AreaName
  9. {
  10. get
  11. {
  12. return "Podcast";
  13. }
  14. }
  15. public override void RegisterArea(AreaRegistrationContext context)
  16. {
  17. context.MapSubdomainRoute(
  18. "Podcast.Index", // Route name
  19. new List<string>() { "dev", "podcast" }, // Subdomains
  20. "", // URL with parameters
  21. new { controller = "Podcast", action = "Index" }, // Parameter defaults
  22. new[] { typeof(Controllers.PodcastController).Namespace }
  23. );
  24. context.MapSubdomainRoute(
  25. "Podcast.View", // Route name
  26. new List<string>() { "dev", "podcast" }, // Subdomains
  27. "{episode}", // URL with parameters
  28. new { controller = "Podcast", action = "View" }, // Parameter defaults
  29. new[] { typeof(Controllers.PodcastController).Namespace }
  30. );
  31. context.MapSubdomainRoute(
  32. "Podcast.Download", // Route name
  33. new List<string>() { "dev", "podcast" }, // Subdomains
  34. "File/{episode}/{fileName}", // URL with parameters
  35. new { controller = "Podcast", action = "Download" }, // Parameter defaults
  36. new[] { typeof(Controllers.PodcastController).Namespace }
  37. );
  38. context.MapSubdomainRoute(
  39. "Podcast.Action", // Route name
  40. new List<string>() { "dev", "podcast" }, // Subdomains
  41. "Action/{controller}/{action}", // URL with parameters
  42. new { controller = "Podcast", action = "Index" }, // Parameter defaults
  43. new[] { typeof(Controllers.PodcastController).Namespace }
  44. );
  45. // Register Script Bundles
  46. BundleTable.Bundles.Add(new ScriptBundle("~/bundles/podcast").Include(
  47. "~/Scripts/bootbox/bootbox.min.js",
  48. "~/Scripts/PageDown/Markdown.Converter.js",
  49. "~/Scripts/PageDown/Markdown.Sanitizer.js",
  50. //"~/Scripts/bootstrap-markdown.js", Uneeded?
  51. "~/Scripts/jquery-ui.widgets.js",
  52. "~/Scripts/jquery.iframe-transport.js",
  53. "~/Scripts/audioplayer.min.js",
  54. "~/Areas/Podcast/Scripts/Podcast.js"));
  55. // Register Style Bundles
  56. BundleTable.Bundles.Add(new StyleBundle("~/Content/podcast").Include(
  57. "~/Content/audioplayer.css",
  58. "~/Content/bootstrap-markdown.min.css",
  59. "~/Areas/Podcast/Content/Podcast.css"));
  60. }
  61. }
  62. }