Search Results for

    Show / Hide Table of Contents
    View Source

    Class LinkGeneratorExtensions

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    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
    Name Description
    T
    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
    Name Description
    T
    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
    Name Description
    T

    The UmbracoApiControllerBase

    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
    Name Description
    T
    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
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetBackOfficeUrl(LinkGenerator, IHostingEnvironment)
      • GetUmbracoApiService<T>(LinkGenerator, Expression<Func<T, Object>>)
      • GetUmbracoApiService<T>(LinkGenerator, String, Nullable<IDictionary<String, Object>>)
      • GetUmbracoApiService<T>(LinkGenerator, String, Object)
      • GetUmbracoApiServiceBaseUrl<T>(LinkGenerator, Expression<Func<T, Object>>)
      • GetUmbracoControllerUrl(LinkGenerator, String, String, String, Nullable<IDictionary<String, Object>>)
      • GetUmbracoControllerUrl(LinkGenerator, String, Type, Nullable<IDictionary<String, Object>>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX