/ListenTo.Web/Helpers/HtmlHelperExtensions/UrlHelper.cs

https://github.com/listentorick/ListenTo
C# | 239 lines | 188 code | 51 blank | 0 comment | 0 complexity | 2edc201d88f25df2041036e5d0e1d1c0 MD5 | raw file
  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.HtmlControls;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.WebControls.WebParts;
  11. using System.Xml.Linq;
  12. using System.Web.Mvc;
  13. using ListenTo.Web.Constants;
  14. using ListenTo.Shared.DO;
  15. using ListenTo.Shared.DTO;
  16. namespace ListenTo.Web.Helpers.HtmlHelperExtensions
  17. {
  18. public static class UrlHelpers
  19. {
  20. public static string AddGigUrl(this HtmlHelper helper)
  21. {
  22. return IOCHelper.GetRouteHelpers().AddGigUrl();
  23. }
  24. public static string GigListingsUrl(this HtmlHelper helper)
  25. {
  26. return IOCHelper.GetRouteHelpers().GigListingsUrl();
  27. }
  28. public static string ViewGigUrl(this HtmlHelper helper, Gig gig)
  29. {
  30. return IOCHelper.GetRouteHelpers().ViewGigUrl(gig);
  31. }
  32. public static string ViewVenueUrl(this HtmlHelper helper, Venue venue)
  33. {
  34. return IOCHelper.GetRouteHelpers().ViewVenueUrl(venue);
  35. }
  36. public static string AddArtistUrl(this HtmlHelper helper)
  37. {
  38. return IOCHelper.GetRouteHelpers().AddArtistUrl();
  39. }
  40. public static string ArtistMusicUrl(this HtmlHelper helper, Artist artist)
  41. {
  42. return IOCHelper.GetRouteHelpers().ArtistMusicUrl(artist);
  43. }
  44. public static string ArtistGigsUrl(this HtmlHelper helper, Artist artist)
  45. {
  46. return IOCHelper.GetRouteHelpers().ArtistGigsUrl(artist);
  47. }
  48. public static string ArtistListingsUrl(this HtmlHelper helper)
  49. {
  50. return IOCHelper.GetRouteHelpers().ArtistListingsUrl();
  51. }
  52. public static string ArtistListingsUrl(this HtmlHelper helper, string style)
  53. {
  54. return IOCHelper.GetRouteHelpers().ArtistListingsUrl(style);
  55. }
  56. public static string ViewArtistUrl(this HtmlHelper helper, Artist artist)
  57. {
  58. return IOCHelper.GetRouteHelpers().ViewArtistUrl(artist);
  59. }
  60. public static string ViewTrackUrl(this HtmlHelper helper, TrackSummary trackSummary)
  61. {
  62. return IOCHelper.GetRouteHelpers().ViewTrackUrl(trackSummary);
  63. }
  64. public static string ViewArtistUrl(this HtmlHelper helper, string artistProfileAddress)
  65. {
  66. return IOCHelper.GetRouteHelpers().ViewArtistUrl(artistProfileAddress);
  67. }
  68. public static string EditArtistUrl(this HtmlHelper helper, Artist artist)
  69. {
  70. return IOCHelper.GetRouteHelpers().EditArtistUrl(artist);
  71. }
  72. public static string EditArtistUrl(this HtmlHelper helper, Guid id)
  73. {
  74. return IOCHelper.GetRouteHelpers().EditArtistUrl(id);
  75. }
  76. public static string BecomeAFanUrl(this HtmlHelper helper, Artist artist)
  77. {
  78. return IOCHelper.GetRouteHelpers().BecomeAFanUrl(artist);
  79. }
  80. public static string EditGigUrl(this HtmlHelper helper, Gig gig)
  81. {
  82. return IOCHelper.GetRouteHelpers().EditGigUrl(gig);
  83. }
  84. public static string AddTrackUrl(this HtmlHelper helper)
  85. {
  86. return IOCHelper.GetRouteHelpers().AddTrackUrl();
  87. }
  88. public static string EditTrackUrl(this HtmlHelper helper, TrackSummary trackSummary)
  89. {
  90. return IOCHelper.GetRouteHelpers().EditTrackUrl(trackSummary);
  91. }
  92. public static string NewsItemListingsUrl(this HtmlHelper helper)
  93. {
  94. return IOCHelper.GetRouteHelpers().NewsItemListingsUrl();
  95. }
  96. public static string AddNewsItemUrl(this HtmlHelper helper)
  97. {
  98. return IOCHelper.GetRouteHelpers().AddNewsItemUrl();
  99. }
  100. public static string EditNewsItemUrl(this HtmlHelper helper, NewsItemSummary newsItemSummary)
  101. {
  102. return IOCHelper.GetRouteHelpers().EditNewsItemUrl(newsItemSummary);
  103. }
  104. public static string ViewNewsItemUrl(this HtmlHelper helper, Guid newsItemId)
  105. {
  106. return IOCHelper.GetRouteHelpers().ViewNewsItemUrl(newsItemId);
  107. }
  108. public static string ViewNewsItemUrl(this HtmlHelper helper, NewsItemSummary newsItemSummary)
  109. {
  110. return IOCHelper.GetRouteHelpers().ViewNewsItemUrl(newsItemSummary);
  111. }
  112. public static string ViewUserProfileUrl(this HtmlHelper helper, UserProfile userProfile)
  113. {
  114. return IOCHelper.GetRouteHelpers().ViewUserProfileUrl(userProfile);
  115. }
  116. public static string ViewUserProfileUrl(this HtmlHelper helper, string username)
  117. {
  118. return IOCHelper.GetRouteHelpers().ViewUserProfileUrl(username);
  119. }
  120. public static string ViewUserContent(this HtmlHelper helper, UserProfile userProfile)
  121. {
  122. return IOCHelper.GetRouteHelpers().ViewUserContent(userProfile);
  123. }
  124. public static string ViewUserContent(this HtmlHelper helper, string username)
  125. {
  126. return IOCHelper.GetRouteHelpers().ViewUserContent(username);
  127. }
  128. public static string ViewWhoIsUrl(this HtmlHelper helper, string username)
  129. {
  130. return IOCHelper.GetRouteHelpers().ViewWhoIsUrl(username);
  131. }
  132. public static string RegisterAccountUrl(this HtmlHelper helper)
  133. {
  134. return IOCHelper.GetRouteHelpers().RegisterAccountUrl();
  135. }
  136. public static string EditUserProfileUrl(this HtmlHelper helper, UserProfile userProfile)
  137. {
  138. return IOCHelper.GetRouteHelpers().EditUserProfileUrl(userProfile);
  139. }
  140. public static string RetrieveDetails(this HtmlHelper helper)
  141. {
  142. return IOCHelper.GetRouteHelpers().RetrieveDetails();
  143. }
  144. public static string DetailsRetrieved(this HtmlHelper helper)
  145. {
  146. return IOCHelper.GetRouteHelpers().DetailsRetrieved();
  147. }
  148. public static string TrackListingsUrl(this HtmlHelper helper, string styleName) {
  149. return IOCHelper.GetRouteHelpers().TrackListingsUrl(styleName);
  150. }
  151. public static string TrackListingsUrl(this HtmlHelper helper)
  152. {
  153. return IOCHelper.GetRouteHelpers().TrackListingsUrl();
  154. }
  155. public static string WhatsNewUrl(this HtmlHelper helper,string username)
  156. {
  157. return IOCHelper.GetRouteHelpers().WhatsNewUrl(username);
  158. }
  159. public static string WhatsNewUrl(this HtmlHelper helper, UserProfile userProfile)
  160. {
  161. return IOCHelper.GetRouteHelpers().WhatsNewUrl(userProfile);
  162. }
  163. public static string About(this HtmlHelper helper)
  164. {
  165. return IOCHelper.GetRouteHelpers().About();
  166. }
  167. public static string PrivacyPolicy(this HtmlHelper helper)
  168. {
  169. return IOCHelper.GetRouteHelpers().PrivacyPolicy();
  170. }
  171. public static string TermsAndConditions(this HtmlHelper helper)
  172. {
  173. return IOCHelper.GetRouteHelpers().TermsAndConditions();
  174. }
  175. public static string AddingContent(this HtmlHelper helper)
  176. {
  177. return IOCHelper.GetRouteHelpers().AddingContent();
  178. }
  179. public static string RSS(this HtmlHelper helper)
  180. {
  181. return IOCHelper.GetRouteHelpers().RSS();
  182. }
  183. public static string TemporaryFileUrl(this HtmlHelper helper, Guid temporaryFileId)
  184. {
  185. return IOCHelper.GetRouteHelpers().TemporaryFileUrl(temporaryFileId);
  186. }
  187. }
  188. }