This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy under /_llms/. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

UrlComposer Pennington.Routing

Composes a canonical base URL with a site-relative path, yielding either a fully-qualified URL (when the base has an http(s) scheme) or a root-relative path (when the base is path-only like / or /sub/).

Methods

Combine

#
public static UrlPath Combine(UrlPath canonicalBase, UrlPath relative)

Combines canonicalBase with relative to produce an absolute URL when the base has an http(s) scheme, or a normalized root-relative path otherwise.

Parameters

canonicalBase UrlPath
relative UrlPath

Returns

UrlPath

Pennington.Routing.UrlComposer

namespace Pennington.Routing;

/// Composes a canonical base URL with a site-relative path, yielding either a fully-qualified URL (when the base has an http(s) scheme) or a root-relative path (when the base is path-only like / or /sub/).
public class UrlComposer
{
    /// Combines canonicalBase with relative to produce an absolute URL when the base has an http(s) scheme, or a normalized root-relative path otherwise.
    
public static UrlPath Combine(UrlPath canonicalBase, UrlPath relative)
; }