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.

ProfileAreaRegistration.cs 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using System.Web.Mvc;
  2. using System.Web.Optimization;
  3. namespace Teknik.Areas.Profile
  4. {
  5. public class ProfileAreaRegistration : AreaRegistration
  6. {
  7. public override string AreaName
  8. {
  9. get
  10. {
  11. return "Profile";
  12. }
  13. }
  14. public override void RegisterArea(AreaRegistrationContext context)
  15. {
  16. context.MapSubdomainRoute(
  17. "Profile.Login", // Route name
  18. "dev",
  19. "Profile/Login", // URL with parameters
  20. new { controller = "Profile", action = "Login" }, // Parameter defaults
  21. new[] { typeof(Controllers.ProfileController).Namespace }
  22. );
  23. context.MapSubdomainRoute(
  24. "Profile.Logout", // Route name
  25. "dev",
  26. "Profile/Logout", // URL with parameters
  27. new { controller = "Profile", action = "Logout" }, // Parameter defaults
  28. new[] { typeof(Controllers.ProfileController).Namespace }
  29. );
  30. context.MapSubdomainRoute(
  31. "Profile.Register", // Route name
  32. "dev",
  33. "Profile/Register", // URL with parameters
  34. new { controller = "Profile", action = "Register" }, // Parameter defaults
  35. new[] { typeof(Controllers.ProfileController).Namespace }
  36. );
  37. context.MapSubdomainRoute(
  38. "Profile.Index", // Route name
  39. "dev",
  40. "Profile/{username}", // URL with parameters
  41. new { controller = "Profile", action = "Index", username = UrlParameter.Optional }, // Parameter defaults
  42. new[] { typeof(Controllers.ProfileController).Namespace }
  43. );
  44. context.MapSubdomainRoute(
  45. "Profile.Action", // Route name
  46. "dev",
  47. "Profile/Action/{action}", // URL with parameters
  48. new { controller = "Profile", action = "Index" }, // Parameter defaults
  49. new[] { typeof(Controllers.ProfileController).Namespace }
  50. );
  51. context.MapSubdomainRoute(
  52. "Profile.Login", // Route name
  53. "profile",
  54. "Login", // URL with parameters
  55. new { controller = "Profile", action = "Login" }, // Parameter defaults
  56. new[] { typeof(Controllers.ProfileController).Namespace }
  57. );
  58. context.MapSubdomainRoute(
  59. "Profile.Logout", // Route name
  60. "profile",
  61. "Logout", // URL with parameters
  62. new { controller = "Profile", action = "Logout" }, // Parameter defaults
  63. new[] { typeof(Controllers.ProfileController).Namespace }
  64. );
  65. context.MapSubdomainRoute(
  66. "Profile.Register", // Route name
  67. "profile",
  68. "Register", // URL with parameters
  69. new { controller = "Profile", action = "Register" }, // Parameter defaults
  70. new[] { typeof(Controllers.ProfileController).Namespace }
  71. );
  72. context.MapSubdomainRoute(
  73. "Profile.Index", // Route name
  74. "profile",
  75. "{username}", // URL with parameters
  76. new { controller = "Profile", action = "Index", username = UrlParameter.Optional }, // Parameter defaults
  77. new[] { typeof(Controllers.ProfileController).Namespace }
  78. );
  79. context.MapSubdomainRoute(
  80. "Profile.Action", // Route name
  81. "profile",
  82. "Action/{action}", // URL with parameters
  83. new { controller = "Profile", action = "Index" }, // Parameter defaults
  84. new[] { typeof(Controllers.ProfileController).Namespace }
  85. );
  86. // Register Script Bundle
  87. BundleTable.Bundles.Add(new ScriptBundle("~/bundles/profile").Include(
  88. "~/Scripts/bootbox/bootbox.min.js",
  89. "~/Scripts/PageDown/Markdown.Converter.js",
  90. "~/Scripts/PageDown/Markdown.Sanitizer.js",
  91. "~/Scripts/bootstrap/markdown/bootstrap-markdown.js",
  92. "~/Scripts/jquery.blockUI.js",
  93. "~/Areas/Profile/Scripts/Profile.js"));
  94. }
  95. }
  96. }