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.

HelpAreaRegistration.cs 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using System.Web.Optimization;
  4. namespace Teknik.Areas.Help
  5. {
  6. public class HelpAreaRegistration : AreaRegistration
  7. {
  8. public override string AreaName
  9. {
  10. get
  11. {
  12. return "Help";
  13. }
  14. }
  15. public override void RegisterArea(AreaRegistrationContext context)
  16. {
  17. context.MapSubdomainRoute(
  18. "Help.Index", // Route name
  19. new List<string>() { "dev", "help" }, // Subdomains
  20. "", // URL with parameters
  21. new { controller = "Help", action = "Index" }, // Parameter defaults
  22. new[] { typeof(Controllers.HelpController).Namespace }
  23. );
  24. context.MapSubdomainRoute(
  25. "Help.API", // Route name
  26. new List<string>() { "dev", "help" }, // Subdomains
  27. "API/{version}/{service}", // URL with parameters
  28. new { controller = "Help", action = "API", version = UrlParameter.Optional, service = UrlParameter.Optional }, // Parameter defaults
  29. new[] { typeof(Controllers.HelpController).Namespace }
  30. );
  31. context.MapSubdomainRoute(
  32. "Help.Blog", // Route name
  33. new List<string>() { "dev", "help" }, // Subdomains
  34. "Blog", // URL with parameters
  35. new { controller = "Help", action = "Blog" }, // Parameter defaults
  36. new[] { typeof(Controllers.HelpController).Namespace }
  37. );
  38. context.MapSubdomainRoute(
  39. "Help.Git", // Route name
  40. new List<string>() { "dev", "help" }, // Subdomains
  41. "Git", // URL with parameters
  42. new { controller = "Help", action = "Git" }, // Parameter defaults
  43. new[] { typeof(Controllers.HelpController).Namespace }
  44. );
  45. context.MapSubdomainRoute(
  46. "Help.IRC", // Route name
  47. new List<string>() { "dev", "help" }, // Subdomains
  48. "IRC", // URL with parameters
  49. new { controller = "Help", action = "IRC" }, // Parameter defaults
  50. new[] { typeof(Controllers.HelpController).Namespace }
  51. );
  52. context.MapSubdomainRoute(
  53. "Help.Mail", // Route name
  54. new List<string>() { "dev", "help" }, // Subdomains
  55. "Mail", // URL with parameters
  56. new { controller = "Help", action = "Mail" }, // Parameter defaults
  57. new[] { typeof(Controllers.HelpController).Namespace }
  58. );
  59. context.MapSubdomainRoute(
  60. "Help.Mumble", // Route name
  61. new List<string>() { "dev", "help" }, // Subdomains
  62. "Mumble", // URL with parameters
  63. new { controller = "Help", action = "Mumble" }, // Parameter defaults
  64. new[] { typeof(Controllers.HelpController).Namespace }
  65. );
  66. context.MapSubdomainRoute(
  67. "Help.Upload", // Route name
  68. new List<string>() { "dev", "help" }, // Subdomains
  69. "Upload", // URL with parameters
  70. new { controller = "Help", action = "Upload" }, // Parameter defaults
  71. new[] { typeof(Controllers.HelpController).Namespace }
  72. );
  73. // Register Style Bundles
  74. BundleTable.Bundles.Add(new StyleBundle("~/Content/help").Include(
  75. "~/Areas/Help/Content/Help.css"));
  76. }
  77. }
  78. }