UriHelper Class

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Provides helper methods for working with URIs.
public static class UriHelper
Inheritance

Fields

EmptyUriRepresents an empty Uri instance.
InvalidPathSegmentCharactersRepresents that characters that are considered invalid in a URI path segment.
PathEndingMarkersRepresents the characters that can be used to indicate the end of a path in a URI.

Methods

Combine(this Uri, string)Creates a new Uri by combining the Uri with a relative URI string.
GetPathPart(string)Retrieves the path portion of a URI string, excluding any query string or fragment.
IsAbsoluteOrRooted(string)Determines whether the given URI string is absolute or rooted.
IsQueryOrFragmentOnly(string)Determines whether the given URI string is a query or fragment-only URI.
ParseQueryString(string)Parses a query string into a collection of key-value pairs.
SplitPathAndSuffix(string)Splits a URI string into its path and suffix components.
SplitPathQueryAndFragment(string)Splits a URI string into its path, query string, and fragment components.
ToQueryString(this IEnumerable<KeyValuePair<string, string>>)Converts a collection of key-value pairs into a query string.
WithFragment(this Uri, string)Creates a new Uri with the specified fragment added.
WithQueryParameter(this Uri, string, string)Creates a new Uri with the specified query parameter added.
WithoutFragment(this Uri)Creates a new Uri with the fragment removed.