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.

IrcAreaRegistration.cs 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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.IRC
  7. {
  8. public class IRCAreaRegistration : AreaRegistration
  9. {
  10. public override string AreaName
  11. {
  12. get
  13. {
  14. return "IRC";
  15. }
  16. }
  17. public override void RegisterArea(AreaRegistrationContext context)
  18. {
  19. Config config = Config.Load();
  20. context.MapSubdomainRoute(
  21. "IRC.Client", // Route name
  22. new List<string>() { "irc" },
  23. new List<string>() { config.Host },
  24. "", // URL with parameters
  25. new { controller = "IRC", action = "Client" }, // Parameter defaults
  26. new[] { typeof(Controllers.IRCController).Namespace }
  27. );
  28. // Register Script Bundle
  29. BundleTable.Bundles.Add(new CdnStyleBundle("~/Content/irc", config.CdnHost).Include(
  30. "~/Areas/IRC/Content/IRC.css"));
  31. // Register Script Bundle
  32. BundleTable.Bundles.Add(new CdnScriptBundle("~/bundles/irc", config.CdnHost).Include(
  33. "~/Scripts/bootbox/bootbox.min.js",
  34. "~/Scripts/jquery.blockUI.js",
  35. "~/Areas/IRC/Scripts/IRC.js"));
  36. }
  37. }
  38. }