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
canonicalBaseUrlPathrelativeUrlPath
Returns
UrlPathPennington.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);
}