View Source
Class UrlHelperExtensions
Extension methods for UrlHelper
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public static class UrlHelperExtensions
Methods
View Source
GetCacheBustHash()
Declaration
public static string GetCacheBustHash()
Returns
Type |
Description |
System.String |
|
View Source
GetUmbracoApiService(UrlHelper, String, String, String, RouteValueDictionary)
Return the URL for a Web Api service
Declaration
public static string GetUmbracoApiService(this UrlHelper url, string actionName, string controllerName, string area, RouteValueDictionary routeVals = null)
Parameters
Type |
Name |
Description |
UrlHelper |
url |
|
System.String |
actionName |
|
System.String |
controllerName |
|
System.String |
area |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
View Source
GetUmbracoApiService(UrlHelper, String, Type, RouteValueDictionary)
Return the URL for a Web Api service
Declaration
public static string GetUmbracoApiService(this UrlHelper url, string actionName, Type apiControllerType, RouteValueDictionary routeVals = null)
Parameters
Type |
Name |
Description |
UrlHelper |
url |
|
System.String |
actionName |
|
System.Type |
apiControllerType |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
View Source
GetUmbracoApiService<T>(UrlHelper, Expression<Func<T, Object>>)
Declaration
public static string GetUmbracoApiService<T>(this UrlHelper url, Expression<Func<T, object>> methodSelector)
where T : UmbracoApiController
Parameters
Type |
Name |
Description |
UrlHelper |
url |
|
System.Linq.Expressions.Expression<System.Func<T, System.Object>> |
methodSelector |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUmbracoApiService<T>(UrlHelper, String, RouteValueDictionary)
Return the URL for a Web Api service
Declaration
public static string GetUmbracoApiService<T>(this UrlHelper url, string actionName, RouteValueDictionary routeVals = null)
where T : UmbracoApiController
Parameters
Type |
Name |
Description |
UrlHelper |
url |
|
System.String |
actionName |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUmbracoApiServiceBaseUrl<T>(UrlHelper, Expression<Func<T, Object>>)
Declaration
public static string GetUmbracoApiServiceBaseUrl<T>(this UrlHelper url, Expression<Func<T, object>> methodSelector)
where T : UmbracoApiController
Parameters
Type |
Name |
Description |
UrlHelper |
url |
|
System.Linq.Expressions.Expression<System.Func<T, System.Object>> |
methodSelector |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUrlWithCacheBust(UrlHelper, String, String, RouteValueDictionary)
Return the URL for an action with a cache-busting hash appended
Declaration
public static string GetUrlWithCacheBust(this UrlHelper url, string actionName, string controllerName, RouteValueDictionary routeVals = null)
Parameters
Type |
Name |
Description |
UrlHelper |
url |
|
System.String |
actionName |
|
System.String |
controllerName |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|