Type QueryStringBuilder
Namespace Geta.EPi.Extensions.QueryString
Interfaces IHtmlString
Helper class for creating and modifying URL's QueryString.
Methods
Fields
Public instance methods
QueryStringBuilder Add(string name, string value)
Adds query string parameter to query URL encoded.
Parameters
-
string
name - Name of parameter.
-
string
value - Value of parameter.
Returns
-
QueryStringBuilder
- Instance of modified QueryStringBuilder.
QueryStringBuilder Remove(string name)
Removes query string parameter from query.
Parameters
-
string
name - Name of parameter to remove.
Returns
-
QueryStringBuilder
- Instance of modified QueryStringBuilder.
QueryStringBuilder Toggle(string name, string value)
Adds query string parameter to query string if it is not already present, otherwise it removes it.
Parameters
-
string
name - Name of parameter to add or remove.
-
string
value - Value of parameter to add.
Returns
-
QueryStringBuilder
- Instance of modified QueryStringBuilder.
string ToHtmlString()
Returns string representation of URL with query string. This is implementation of IHtmlString.
Returns
-
string
- String representation of URL with query string.
Public static methods
QueryStringBuilder Create(string url)
Factory method for instantiating new QueryStringBuilder with provided URL.
Parameters
-
string
url - URL for which to build query.
Returns
-
QueryStringBuilder
- Instance of QueryStringBuilder.
Public fields
QueryStringBuilder Empty
Represents the empty query string. Field is read-only.
return QueryStringBuilder
|