Delen via


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>
public readonly 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)

Concatenates other to the current query string.

Add(String, String)

Concatenates a query string with name and value to the current query 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)

Evaluates if the current query string is equal to an object obj.

Equals(QueryString)

Evalutes if the current query string is equal to other.

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()

Gets a hash code for the value.

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)

Concatenates left and right into a single query string.

Equality(QueryString, QueryString)

Evaluates if one query string is equal to another.

Inequality(QueryString, QueryString)

Evaluates if one query string is not equal to another.

Applies to