This site provides a machine-readable index at /llms.txt.

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);
}