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 3.9KB

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