Class UriQuery
Represents a query in a Uri.
Namespace: Sartorius.SAF.Infrastructure
Assembly: Sartorius.SAF.dll
Syntax
public class UriQuery : IEnumerable<KeyValuePair<string, string>>, IEnumerable
Remarks
This class can be used to parse a query string to access
Constructors
View SourceUriQuery()
Initializes a new instance of the UriQuery class.
Declaration
public UriQuery()
UriQuery(string)
Initializes a new instance of the UriQuery class with a query string.
Declaration
public UriQuery(string query)
Parameters
| Type | Name | Description |
|---|---|---|
| string | query | The query string. |
Properties
View Sourcethis[string]
Gets the string with the specified key.
Declaration
public string this[string key] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| string | key |
Property Value
| Type | Description |
|---|---|
| string | The value for the specified key, or null if the query does not contain such a key. |
Methods
View SourceAdd(string, string)
Adds the specified key and value.
Declaration
public void Add(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The name. |
| string | value | The value. |
GetEnumerator()
Gets the enumerator.
Declaration
public IEnumerator<KeyValuePair<string, string>> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<KeyValuePair<string, string>> |
ToString()
Returns a string that represents this instance as a query string.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string that represents this instance. |