Class QueryArgumentsParser
Helper methods to parse query arguments from a Uri.
Inherited Members
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public static class QueryArgumentsParser
Methods
GetDictionaryFromArguments(Uri, bool)
Parse the a Uri and returns a Dictionary of keys and values as string.
Declaration
public static Dictionary<string, string> GetDictionaryFromArguments(Uri uri, bool allowOverwrite = false)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | The Uri containing a query. |
bool | allowOverwrite | Whether to allow a query to be overwritten if it exists more than once. |
Returns
Type | Description |
---|---|
Dictionary<string, string> | The resulting Dictionary<TKey, TValue>. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when uri is null. |
GetDictionaryFromString(string, bool)
Parse the a query and returns a Dictionary of keys and values as string.
Declaration
public static Dictionary<string, string> GetDictionaryFromString(string queryString, bool allowOverwrite = false)
Parameters
Type | Name | Description |
---|---|---|
string | queryString | The query to parse. |
bool | allowOverwrite | Whether to allow a query to be overwritten if it exists more than once. |
Returns
Type | Description |
---|---|
Dictionary<string, string> | The resulting Dictionary<TKey, TValue>. |