UrlPath Pennington.Routing
A URL path value supporting composition and normalization.
Properties
Valuestring- Underlying path string.
Constructors
UrlPath
#public UrlPath(string Value)
A URL path value supporting composition and normalization.
Parameters
Valuestring- Underlying path string.
Methods
EnsureLeadingSlash
#public UrlPath EnsureLeadingSlash()
Returns a path guaranteed to start with a slash.
Returns
UrlPathEnsureTrailingSlash
#public UrlPath EnsureTrailingSlash()
Returns a path guaranteed to end with a slash.
Returns
UrlPathMatches
#public bool Matches(UrlPath other)
Compares two URL paths ignoring trailing slashes, index.html suffixes, and case.
Parameters
otherUrlPath
Returns
boolRemoveLeadingSlash
#public UrlPath RemoveLeadingSlash()
Removes a leading slash if present.
Returns
UrlPathRemoveTrailingSlash
#public UrlPath RemoveTrailingSlash()
Removes a trailing slash (except from the root path).
Returns
UrlPathToString
#public string ToString()
Returns the underlying URL string.
Returns
stringPennington.Routing.UrlPath
namespace Pennington.Routing;
/// A URL path value supporting composition and normalization.
public struct UrlPath
{
/// Returns a path guaranteed to start with a slash.
public UrlPath EnsureLeadingSlash()
;
/// Returns a path guaranteed to end with a slash.
public UrlPath EnsureTrailingSlash()
;
/// Compares two URL paths ignoring trailing slashes, index.html suffixes, and case.
public bool Matches(UrlPath other)
;
/// Removes a leading slash if present.
public UrlPath RemoveLeadingSlash()
;
/// Removes a trailing slash (except from the root path).
public UrlPath RemoveTrailingSlash()
;
/// Returns the underlying URL string.
public string ToString()
;
/// A URL path value supporting composition and normalization.
public UrlPath(string Value)
;
/// Underlying path string.
public string Value { get; set; }
}