Send feedback
Class ParameterCollection (1.60.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.60.0 keyboard_arrow_down
public class ParameterCollection : List<KeyValuePair<string, string>>, IList<KeyValuePair<string, string>>, ICollection<KeyValuePair<string, string>>, IReadOnlyList<KeyValuePair<string, string>>, IReadOnlyCollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IList, ICollection, IEnumerable
A collection of parameters (key value pairs). May contain duplicate keys.
Inherited Members
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.get_Item(int)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.set_Item(int, object)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.ConvertAll<TOutput>(System.Converter<System.Collections.Generic.KeyValuePair<string, string>, TOutput>)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.Exists(System.Predicate<System.Collections.Generic.KeyValuePair<string, string>>)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.FindLastIndex(int, int, System.Predicate<System.Collections.Generic.KeyValuePair<string, string>>)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.ForEach(System.Action<System.Collections.Generic.KeyValuePair<string, string>>)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.Insert(int, System.Collections.Generic.KeyValuePair<string, string>)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.Reverse(int, int)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.ICollection.CopyTo(System.Array, int)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.Add(object)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.Contains(object)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.IndexOf(object)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.Insert(int, object)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.Remove(object)
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>.System.Collections.IList.Item[int]
Namespace
Google Apis Requests Parameters
Assembly
Google.Apis.Core.dll
Constructors
ParameterCollection()
public ParameterCollection()
Constructs a new parameter collection.
ParameterCollection(IEnumerable<KeyValuePair<string, string>>)
public ParameterCollection(IEnumerable<KeyValuePair<string, string>> collection)
Constructs a new parameter collection from the given collection.
Properties
this[string]
public IEnumerable<string> this [ string key ] { get ; }
Returns all matches for the specified key. May return an empty enumeration if the key is not present.
Parameter
Name
Description
key
string
Methods
Add(string, string)
public void Add(string key, string value)
Adds a single parameter to this collection.
ContainsKey(string)
public bool ContainsKey(string key)
Returns true
if this parameter is set within the collection.
Parameter
Name
Description
key
string
Returns
Type
Description
bool
FromDictionary(IDictionary<string, object>)
public 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.
FromQueryString(string)
public static ParameterCollection FromQueryString(string qs)
Creates a parameter collection from the specified URL encoded query string.
Example:
The query string "foo=bar&chocolate=cookie" would result in two parameters (foo and bar)
with the values "bar" and "cookie" set.
Parameter
Name
Description
qs
string
GetAllMatches(string)
public IEnumerable<string> GetAllMatches(string key)
Returns all matches for the specified key. May return an empty enumeration if the key is not present.
Parameter
Name
Description
key
string
GetFirstMatch(string)
public 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.
Parameter
Name
Description
key
string
Returns
Type
Description
string
TryGetValue(string, out string)
public 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.
Returns
Type
Description
bool
Extension Method
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-06 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-06 UTC."],[],[]]