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.

PasteAreaRegistration.cs 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using System.Web.Optimization;
  4. namespace Teknik.Areas.Paste
  5. {
  6. public class PasteAreaRegistration : AreaRegistration
  7. {
  8. public override string AreaName
  9. {
  10. get
  11. {
  12. return "Paste";
  13. }
  14. }
  15. public override void RegisterArea(AreaRegistrationContext context)
  16. {
  17. context.MapSubdomainRoute(
  18. "Paste.Index", // Route name
  19. new List<string>() { "dev", "paste", "p" },
  20. "", // URL with parameters
  21. new { controller = "Paste", action = "Index" }, // Parameter defaults
  22. new[] { typeof(Controllers.PasteController).Namespace }
  23. );
  24. context.MapSubdomainRoute(
  25. "Paste.View", // Route name
  26. new List<string>() { "dev", "paste", "p" },
  27. "{id}", // URL with parameters
  28. new { controller = "Paste", action = "View" }, // Parameter defaults
  29. new[] { typeof(Controllers.PasteController).Namespace }
  30. );
  31. context.MapSubdomainRoute(
  32. "Paste.Simple", // Route name
  33. new List<string>() { "dev", "paste", "p" },
  34. "Simple/{id}", // URL with parameters
  35. new { controller = "Paste", action = "Simple" }, // Parameter defaults
  36. new[] { typeof(Controllers.PasteController).Namespace }
  37. );
  38. context.MapSubdomainRoute(
  39. "Paste.Raw", // Route name
  40. new List<string>() { "dev", "paste", "p" },
  41. "Raw/{id}", // URL with parameters
  42. new { controller = "Paste", action = "Raw" }, // Parameter defaults
  43. new[] { typeof(Controllers.PasteController).Namespace }
  44. );
  45. // Register Script Bundles
  46. BundleTable.Bundles.Add(new ScriptBundle("~/bundles/paste").Include(
  47. "~/Scripts/Highlight/highlight.pack.js"));
  48. // Register Style Bundles
  49. BundleTable.Bundles.Add(new StyleBundle("~/Content/paste").Include(
  50. "~/Content/Highlight/default.css"));
  51. }
  52. }
  53. }