Class UrlHelperExtensions
Extension methods for UrlHelper
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:umbraco.dll
Syntax
public static class UrlHelperExtensions
Methods
GetCacheBustHash()
Declaration
public static string GetCacheBustHash()
Returns
Type |
Description |
System.String |
|
GetExamineManagementServicePath(UrlHelper)
Returns the base path (not including the 'action') of the MVC controller "ExamineManagementController"
Declaration
public static string GetExamineManagementServicePath(this UrlHelper url)
Parameters
Type |
Name |
Description |
System.Web.Mvc.UrlHelper |
url |
|
Returns
Type |
Description |
System.String |
|
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 |
System.Web.Mvc.UrlHelper |
url |
|
System.String |
actionName |
|
System.String |
controllerName |
|
System.String |
area |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
GetUmbracoApiService(UrlHelper, String, String, RouteValueDictionary)
Return the Url for a Web Api service
Declaration
public static string GetUmbracoApiService(this UrlHelper url, string actionName, string controllerName, RouteValueDictionary routeVals = null)
Parameters
Type |
Name |
Description |
System.Web.Mvc.UrlHelper |
url |
|
System.String |
actionName |
|
System.String |
controllerName |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
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 |
System.Web.Mvc.UrlHelper |
url |
|
System.String |
actionName |
|
System.Type |
apiControllerType |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
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 |
System.Web.Mvc.UrlHelper |
url |
|
System.Linq.Expressions.Expression<System.Func<T, System.Object>> |
methodSelector |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
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 |
System.Web.Mvc.UrlHelper |
url |
|
System.String |
actionName |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
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 |
System.Web.Mvc.UrlHelper |
url |
|
System.Linq.Expressions.Expression<System.Func<T, System.Object>> |
methodSelector |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
GetUmbracoApiServiceBaseUrl<T>(UrlHelper, String)
Return the Base Url (not including the action) for a Web Api service
Declaration
public static string GetUmbracoApiServiceBaseUrl<T>(this UrlHelper url, string actionName)where T : UmbracoApiController
Parameters
Type |
Name |
Description |
System.Web.Mvc.UrlHelper |
url |
|
System.String |
actionName |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
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 |
System.Web.Mvc.UrlHelper |
url |
|
System.String |
actionName |
|
System.String |
controllerName |
|
System.Web.Routing.RouteValueDictionary |
routeVals |
|
Returns
Type |
Description |
System.String |
|