Google API Client Library for .NET  1.10.0
Public Member Functions | Static Public Member Functions | Properties | List of all members
Google.Apis.Requests.Parameters.ParameterCollection Class Reference

A collection of parameters (key value pairs). May contain duplicate keys. More...

Inheritance diagram for Google.Apis.Requests.Parameters.ParameterCollection:

Public Member Functions

 ParameterCollection ()
 Constructs a new parameter collection. More...
 
 ParameterCollection (IEnumerable< KeyValuePair< string, string >> collection)
 Constructs a new parameter collection from the given collection. More...
 
void Add (string key, string value)
 Adds a single parameter to this collection. More...
 
bool ContainsKey (string key)
 Returns true if this parameter is set within the collection. More...
 
bool TryGetValue (string key, out string value)
 Tries to find the a key within the specified key value collection. Returns true if the key was found. If a pair was found the out parameter value will contain the value of that pair. More...
 
string GetFirstMatch (string key)
 Returns the value of the first matching key, or throws a KeyNotFoundException if the parameter is not present within the collection. More...
 
IEnumerable< string > GetAllMatches (string key)
 Returns all matches for the specified key. May return an empty enumeration if the key is not present. More...
 

Static Public Member Functions

static ParameterCollection FromQueryString (string qs)
 Creates a parameter collection from the specified URL encoded query string. Example: The query string "foo=bar&amp;chocolate=cookie" would result in two parameters (foo and bar) with the values "bar" and "cookie" set. More...
 
static ParameterCollection FromDictionary (IDictionary< string, object > dictionary)
 Creates a parameter collection from the specified dictionary. If the value is an enumerable, a parameter pair will be added for each value. Otherwise the value will be converted into a string using the .ToString() method. More...
 

Properties

IEnumerable< string > this[string key] [get]
 Returns all matches for the specified key. May return an empty enumeration if the key is not present. More...
 

Detailed Description

A collection of parameters (key value pairs). May contain duplicate keys.

Constructor & Destructor Documentation

Google.Apis.Requests.Parameters.ParameterCollection.ParameterCollection ( )
inline

Constructs a new parameter collection.

Google.Apis.Requests.Parameters.ParameterCollection.ParameterCollection ( IEnumerable< KeyValuePair< string, string >>  collection)
inline

Constructs a new parameter collection from the given collection.

Member Function Documentation

void Google.Apis.Requests.Parameters.ParameterCollection.Add ( string  key,
string  value 
)
inline

Adds a single parameter to this collection.

bool Google.Apis.Requests.Parameters.ParameterCollection.ContainsKey ( string  key)
inline

Returns true if this parameter is set within the collection.

static ParameterCollection Google.Apis.Requests.Parameters.ParameterCollection.FromDictionary ( IDictionary< string, object >  dictionary)
inlinestatic

Creates a parameter collection from the specified dictionary. If the value is an enumerable, a parameter pair will be added for each value. Otherwise the value will be converted into a string using the .ToString() method.

static ParameterCollection Google.Apis.Requests.Parameters.ParameterCollection.FromQueryString ( string  qs)
inlinestatic

Creates a parameter collection from the specified URL encoded query string. Example: The query string "foo=bar&amp;chocolate=cookie" would result in two parameters (foo and bar) with the values "bar" and "cookie" set.

IEnumerable<string> Google.Apis.Requests.Parameters.ParameterCollection.GetAllMatches ( string  key)
inline

Returns all matches for the specified key. May return an empty enumeration if the key is not present.

string Google.Apis.Requests.Parameters.ParameterCollection.GetFirstMatch ( string  key)
inline

Returns the value of the first matching key, or throws a KeyNotFoundException if the parameter is not present within the collection.

bool Google.Apis.Requests.Parameters.ParameterCollection.TryGetValue ( string  key,
out string  value 
)
inline

Tries to find the a key within the specified key value collection. Returns true if the key was found. If a pair was found the out parameter value will contain the value of that pair.

Property Documentation

IEnumerable<string> Google.Apis.Requests.Parameters.ParameterCollection.this[string key]
get

Returns all matches for the specified key. May return an empty enumeration if the key is not present.


The documentation for this class was generated from the following file: