Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct Microsoft.​AspNetCore.​Http.​FragmentString
Assembly: Microsoft.AspNetCore.Http.Abstractions
Implemented Interfaces
Provides correct handling for FragmentString value when needed to generate a URI string
Fields and Constants
public static readonly
FragmentString
Empty
Represents the empty fragment string. This field is read-only.
Properties
public
string
Value
The escaped fragment string with the leading '#' character
public
bool
HasValue
True if the fragment string is not empty
Methods
public
string
ToString​()
Provides the fragment string escaped in a way which is correct for combining into the URI representation.
A leading '#' character will be included unless the Value is null or empty. Characters which are potentially
dangerous are escaped.
Returns The fragment string value
public
string
ToUriComponent​()
Provides the fragment string escaped in a way which is correct for combining into the URI representation.
A leading '#' character will be included unless the Value is null or empty. Characters which are potentially
dangerous are escaped.
Returns The fragment string value
public static
FragmentString
FromUriComponent​(string uriComponent)
Returns an FragmentString given the fragment as it is escaped in the URI format. The string MUST NOT contain any
value that is not a fragment.
Returns The resulting FragmentString
uriComponent
The escaped fragment as it appears in the URI format.
public static
FragmentString
FromUriComponent​(System.​Uri uri)
Returns an FragmentString given the fragment as from a Uri object. Relative Uri objects are not supported.
Returns The resulting FragmentString
uri
The Uri object
public
bool
Equals​(FragmentString other)
Evaluates if the current fragment is equal to another fragment <paramref name="other" /> .
Returns <see langword="true" /> if the fragments are equal.
other
A <see cref="T:Microsoft.AspNetCore.Http.FragmentString" /> to compare.
public
bool
Equals​(object obj)
Evaluates if the current fragment is equal to an object <paramref name="obj" /> .
Returns <see langword="true" /> if the fragments are equal.
obj
An object to compare.
public
int
GetHashCode​()
Gets a hash code for the value.
Returns The hash code as an <see cref="T:System.Int32" /> .
protected
void
Finalize​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object