View Source
Class LinkGeneratorExtensions
Inheritance
System.Object
Assembly: Umbraco.Web.Common.dll
Syntax
public static class LinkGeneratorExtensions
Methods
View Source
GetBackOfficeUrl(LinkGenerator, IHostingEnvironment)
Return the back office url if the back office is installed
Declaration
public static string GetBackOfficeUrl(this LinkGenerator linkGenerator, IHostingEnvironment hostingEnvironment)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
IHostingEnvironment |
hostingEnvironment |
|
Returns
Type |
Description |
System.String |
|
View Source
GetUmbracoApiService<T>(LinkGenerator, Expression<Func<T, Object>>)
Declaration
public static string GetUmbracoApiService<T>(this LinkGenerator linkGenerator, Expression<Func<T, object>> methodSelector)
where T : UmbracoApiController
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
System.Linq.Expressions.Expression<Func<T, System.Object>> |
methodSelector |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUmbracoApiService<T>(LinkGenerator, String, Nullable<IDictionary<String, Object>>)
Declaration
public static string GetUmbracoApiService<T>(this LinkGenerator linkGenerator, string actionName, IDictionary<string, object>? values)
where T : UmbracoApiControllerBase
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
System.String |
actionName |
|
System.Nullable<IDictionary<System.String, System.Object>> |
values |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUmbracoApiService<T>(LinkGenerator, String, Object)
Return the Url for a Web Api service
Declaration
public static string GetUmbracoApiService<T>(this LinkGenerator linkGenerator, string actionName, object id = null)
where T : UmbracoApiControllerBase
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
System.String |
actionName |
|
System.Object |
id |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUmbracoApiServiceBaseUrl<T>(LinkGenerator, Expression<Func<T, Object>>)
Declaration
public static string GetUmbracoApiServiceBaseUrl<T>(this LinkGenerator linkGenerator, Expression<Func<T, object>> methodSelector)
where T : UmbracoApiControllerBase
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
System.Linq.Expressions.Expression<Func<T, System.Object>> |
methodSelector |
|
Returns
Type |
Description |
System.String |
|
Type Parameters
View Source
GetUmbracoControllerUrl(LinkGenerator, String, String, String, Nullable<IDictionary<String, Object>>)
Return the Url for an Umbraco controller
Declaration
public static string GetUmbracoControllerUrl(this LinkGenerator linkGenerator, string actionName, string controllerName, string area, IDictionary<string, object>? dict = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
System.String |
actionName |
|
System.String |
controllerName |
|
System.String |
area |
|
System.Nullable<IDictionary<System.String, System.Object>> |
dict |
|
Returns
Type |
Description |
System.String |
|
View Source
GetUmbracoControllerUrl(LinkGenerator, String, Type, Nullable<IDictionary<String, Object>>)
Return the Url for an Umbraco controller
Declaration
public static string GetUmbracoControllerUrl(this LinkGenerator linkGenerator, string actionName, Type controllerType, IDictionary<string, object>? values = null)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Routing.LinkGenerator |
linkGenerator |
|
System.String |
actionName |
|
Type |
controllerType |
|
System.Nullable<IDictionary<System.String, System.Object>> |
values |
|
Returns
Type |
Description |
System.String |
|