Search Results for

    Show / Hide Table of Contents
    View Source

    Interface ISiteDomainMapper

    Provides utilities to handle site domains.

    Namespace: Umbraco.Cms.Core.Routing
    Assembly: Umbraco.Core.dll
    Syntax
    public interface ISiteDomainMapper

    Methods

    View Source

    MapDomain(IReadOnlyCollection<DomainAndUri>, Uri, string?, string?)

    Filters a list of DomainAndUri to pick one that best matches the current request.

    Declaration
    DomainAndUri? MapDomain(IReadOnlyCollection<DomainAndUri> domainAndUris, Uri current, string? culture, string? defaultCulture)
    Parameters
    Type Name Description
    IReadOnlyCollection<DomainAndUri> domainAndUris

    The list of DomainAndUri to filter.

    Uri current

    The Uri of the current request.

    string culture

    A culture.

    string defaultCulture

    The default culture.

    Returns
    Type Description
    DomainAndUri

    The selected DomainAndUri.

    Remarks

    If the filter is invoked then domainAndUris is _not_ empty and current is _not_ null, and current could not be matched with anything in domainAndUris.

    The culture may be null, but when non-null, it can be used to help pick the best matches.

    The filter _must_ return something else an exception will be thrown.

    View Source

    MapDomains(IReadOnlyCollection<DomainAndUri>, Uri, bool, string?, string?)

    Filters a list of DomainAndUri to pick those that best matches the current request.

    Declaration
    IEnumerable<DomainAndUri> MapDomains(IReadOnlyCollection<DomainAndUri> domainAndUris, Uri current, bool excludeDefault, string? culture, string? defaultCulture)
    Parameters
    Type Name Description
    IReadOnlyCollection<DomainAndUri> domainAndUris

    The list of DomainAndUri to filter.

    Uri current

    The Uri of the current request.

    bool excludeDefault

    A value indicating whether to exclude the current/default domain.

    string culture

    A culture.

    string defaultCulture

    The default culture.

    Returns
    Type Description
    IEnumerable<DomainAndUri>

    The selected DomainAndUri items.

    Remarks

    The filter must return something, even empty, else an exception will be thrown.

    The culture may be null, but when non-null, it can be used to help pick the best matches.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX