RawUri Class

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

Definition

Represents a URI that preserves the original string representation including all escape sequences.
public class RawUri : Uri
Inheritance

Remarks

The RawUri class is a subclass of Uri that preserves the original URI string exactly as provided, including all escape sequences. This is particularly useful when standard Uri behavior would decode escaped characters like %2D (dash) back to their unescaped forms.

Thread Safety

All public members of the type are guaranteed to be thread-safe.

Constructors

RawUri(string)Initializes a new instance of the RawUri class using the specified URI string.
RawUri(Uri, string)Initializes a new instance of the RawUri class with the specified base URI and relative URI string.
RawUri(Uri, Uri)Initializes a new instance of the RawUri class with the specified base URI and relative URI.
RawUri(string, UriKind)Initializes a new instance of the RawUri class using the specified URI string and URI kind.

Methods

ToString()Returns the original string representation of the URI without any normalization or decoding of escape sequences.

Extension Methods

Combine(this Uri, string)Creates a new Uri by combining the Uri with a relative URI string.
WithFragment(this Uri, string)Creates a new Uri with the specified fragment added.
WithoutFragment(this Uri)Creates a new Uri with the fragment removed.
WithQueryParameter(this Uri, string, string)Creates a new Uri with the specified query parameter added.