QueryString Struct

Definition

Provides correct handling for QueryString value when needed to reconstruct a request or redirect URI string

public value class QueryString : IEquatable<Microsoft::AspNetCore::Http::QueryString>
public struct QueryString : IEquatable<Microsoft.AspNetCore.Http.QueryString>
type QueryString = struct
Public Structure QueryString
Implements IEquatable(Of QueryString)
Inheritance
QueryString
Implements

Constructors

QueryString(String)

Initialize the query string with a given value. This value must be in escaped and delimited format with a leading '?' character.

Fields

Empty

Represents the empty query string. This field is read-only.

Properties

HasValue

True if the query string is not empty

Value

The escaped query string with the leading '?' character

Methods

Add(QueryString)
Add(String, String)
Create(IEnumerable<KeyValuePair<String,String>>)

Creates a query string composed from the given name value pairs.

Create(IEnumerable<KeyValuePair<String,StringValues>>)

Creates a query string composed from the given name value pairs.

Create(String, String)

Create a query string with a single given parameter name and value.

Equals(Object)
Equals(QueryString)
FromUriComponent(String)

Returns an QueryString given the query as it is escaped in the URI format. The string MUST NOT contain any value that is not a query.

FromUriComponent(Uri)

Returns an QueryString given the query as from a Uri object. Relative Uri objects are not supported.

GetHashCode()
ToString()

Provides the query 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.

ToUriComponent()

Provides the query 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.

Operators

Addition(QueryString, QueryString)
Equality(QueryString, QueryString)
Inequality(QueryString, QueryString)

Applies to