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.

TransparencyAreaRegistration.cs 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using System.Web.Optimization;
  4. using Teknik.Configuration;
  5. using Teknik.Utilities;
  6. namespace Teknik.Areas.Transparency
  7. {
  8. public class TransparencyAreaRegistration : AreaRegistration
  9. {
  10. public override string AreaName
  11. {
  12. get
  13. {
  14. return "Transparency";
  15. }
  16. }
  17. public override void RegisterArea(AreaRegistrationContext context)
  18. {
  19. Config config = Config.Load();
  20. context.MapSubdomainRoute(
  21. "Transparency.Index",
  22. new List<string>() { "transparency" }, // Subdomains
  23. new List<string>() { config.Host }, // domains
  24. "",
  25. new { controller = "Transparency", action = "Index" },
  26. new[] { typeof(Controllers.TransparencyController).Namespace }
  27. );
  28. context.MapSubdomainRoute(
  29. "Transparency.Action",
  30. new List<string>() { "transparency" }, // Subdomains
  31. new List<string>() { config.Host }, // domains
  32. "Action/{controller}/{action}",
  33. new { controller = "Transparency", action = "Index" },
  34. new[] { typeof(Controllers.TransparencyController).Namespace }
  35. );
  36. // Register Script Bundle
  37. BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/transparency", config.CdnHost).Include(
  38. "~/Scripts/Highcharts/highcharts.js",
  39. "~/Areas/Transparency/Scripts/Transparency.js"));
  40. }
  41. }
  42. }