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.

HomeAreaRegistration.cs 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System.Web.Mvc;
  2. using System.Web.Optimization;
  3. using Teknik;
  4. namespace Teknik.Areas.Home
  5. {
  6. public class HomeAreaRegistration : AreaRegistration
  7. {
  8. public override string AreaName
  9. {
  10. get
  11. {
  12. return "Home";
  13. }
  14. }
  15. public override void RegisterArea(AreaRegistrationContext context)
  16. {
  17. context.MapSubdomainRoute(
  18. "Home.Index", // Route name
  19. "dev",
  20. "Home", // URL with parameters
  21. new { controller = "Home", action = "Index" }, // Parameter defaults
  22. new[] { typeof(Controllers.HomeController).Namespace }
  23. );
  24. context.MapSubdomainRoute(
  25. "Home.Default", // Route name
  26. "dev",
  27. "", // URL with parameters
  28. new { controller = "Home", action = "Index" }, // Parameter defaults
  29. new[] { typeof(Controllers.HomeController).Namespace }
  30. );
  31. context.MapSubdomainRoute(
  32. "Home.Index", // Route name
  33. "www",
  34. "", // URL with parameters
  35. new { controller = "Home", action = "Index" }, // Parameter defaults
  36. new[] { typeof(Controllers.HomeController).Namespace }
  37. );
  38. context.MapSubdomainRoute(
  39. "Home.Index", // Route name
  40. string.Empty,
  41. "", // URL with parameters
  42. new { controller = "Home", action = "Index" }, // Parameter defaults
  43. new[] { typeof(Controllers.HomeController).Namespace }
  44. );
  45. // Register Style Bundles
  46. BundleTable.Bundles.Add(new StyleBundle("~/Content/home").Include(
  47. "~/Areas/Home/Content/Home.css"));
  48. }
  49. }
  50. }