C# Class Aspectacular.QueryStringEx

Datei anzeigen Open project: vgribok/Aspectacular

Public Methods

Method Description
GetQs ( this request ) : string

Returns modified http request querystring, starting with question mark, or "" if not query string parameters were specified.

GetUrlWithQs ( this request, bool includeHost = false ) : string

Returns redirect URL with modified http query string

SetQsValue ( this request, string paramName, string paramValueFormat ) : void

Changes query string of current http request by adding or replacing query string parameter value in the way that avoids creating duplicates.

Private Methods

Method Description
EnsureQsStored ( HttpRequest request ) : NameValueCollection

Method Details

GetQs() public static method

Returns modified http request querystring, starting with question mark, or "" if not query string parameters were specified.
public static GetQs ( this request ) : string
request this
return string

GetUrlWithQs() public static method

Returns redirect URL with modified http query string
public static GetUrlWithQs ( this request, bool includeHost = false ) : string
request this
includeHost bool if true, returns url starting with "http[s]://..". If false, returns url starting with "/".
return string

SetQsValue() public static method

Changes query string of current http request by adding or replacing query string parameter value in the way that avoids creating duplicates.
public static SetQsValue ( this request, string paramName, string paramValueFormat ) : void
request this
paramName string
paramValueFormat string
return void