Search Results for

    Show / Hide Table of Contents
    View Source

    Class SiteDomainMapper

    Provides utilities to handle site domains.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Routing
    Assembly: Umbraco.Core.dll
    Syntax
    public class SiteDomainMapper : ISiteDomainMapper

    Methods

    View Source

    AddSite(String, IEnumerable<String>)

    Adds a site.

    Declaration
    public void AddSite(string key, IEnumerable<string> domains)
    Parameters
    Type Name Description
    System.String key

    A key uniquely identifying the site.

    IEnumerable<System.String> domains

    The site domains.

    Remarks

    At the moment there is no public way to remove a site. Clear and reconfigure.

    View Source

    AddSite(String, String[])

    Adds a site.

    Declaration
    public void AddSite(string key, params string[] domains)
    Parameters
    Type Name Description
    System.String key

    A key uniquely identifying the site.

    System.String[] domains

    The site domains.

    Remarks

    At the moment there is no public way to remove a site. Clear and reconfigure.

    View Source

    BindSites(String[])

    Binds some sites.

    Declaration
    public void BindSites(params string[] keys)
    Parameters
    Type Name Description
    System.String[] keys

    The keys uniquely identifying the sites to bind.

    Remarks

    At the moment there is no public way to unbind sites. Clear and reconfigure.

    If site1 is bound to site2 and site2 is bound to site3 then site1 is bound to site3.

    View Source

    Clear()

    Clears the entire configuration.

    Declaration
    public void Clear()
    View Source

    Dispose()

    Declaration
    public void Dispose()
    View Source

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing
    View Source

    MapDomain(IReadOnlyCollection<DomainAndUri>, Uri, String, String)

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

    Declaration
    public virtual 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.

    System.String culture

    A culture.

    System.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, Boolean, String, String)

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

    Declaration
    public virtual 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.

    System.Boolean excludeDefault

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

    System.String culture

    A culture.

    System.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.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • AddSite(String, IEnumerable<String>)
      • AddSite(String, String[])
      • BindSites(String[])
      • Clear()
      • Dispose()
      • Dispose(Boolean)
      • MapDomain(IReadOnlyCollection<DomainAndUri>, Uri, String, String)
      • MapDomains(IReadOnlyCollection<DomainAndUri>, Uri, Boolean, String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX