Show / Hide Table of Contents

Class DictionaryExtensions

Inheritance
object
DictionaryExtensions
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: GitCredentialManager
Assembly: Algenta.Colectica.Repository.Client.dll
Syntax
public static class DictionaryExtensions

Methods

Append<TKey, TValue>(IDictionary<TKey, ICollection<TValue>>, TKey, TValue)

Declaration
public static void Append<TKey, TValue>(this IDictionary<TKey, ICollection<TValue>> dict, TKey key, TValue value)
Parameters
Type Name Description
IDictionary<TKey, ICollection<TValue>> dict
TKey key
TValue value
Type Parameters
Name Description
TKey
TValue

GetBooleanyOrDefault(IReadOnlyDictionary<string, string>, string, bool)

Get the value of a dictionary entry as 'booleany' (either 'truthy' or 'falsey').

Declaration
public static bool GetBooleanyOrDefault(this IReadOnlyDictionary<string, string> dict, string key, bool defaultValue)
Parameters
Type Name Description
IReadOnlyDictionary<string, string> dict

Dictionary.

string key

Dictionary entry key.

bool defaultValue

Default value if the key is not present, or was neither 'truthy' or 'falsey'.

Returns
Type Description
bool

Dictionary entry value.

Remarks

'Truthy' and 'fasley' is defined by the implementation of IsTruthy(string) and IsFalsey(string).

GetValues<TKey, TValue>(IDictionary<TKey, ICollection<TValue>>, TKey)

Declaration
public static IEnumerable<TValue> GetValues<TKey, TValue>(this IDictionary<TKey, ICollection<TValue>> dict, TKey key)
Parameters
Type Name Description
IDictionary<TKey, ICollection<TValue>> dict
TKey key
Returns
Type Description
IEnumerable<TValue>
Type Parameters
Name Description
TKey
TValue

GetValues<TKey, TValue>(IDictionary<TKey, IEnumerable<TValue>>, TKey)

Declaration
public static IEnumerable<TValue> GetValues<TKey, TValue>(this IDictionary<TKey, IEnumerable<TValue>> dict, TKey key)
Parameters
Type Name Description
IDictionary<TKey, IEnumerable<TValue>> dict
TKey key
Returns
Type Description
IEnumerable<TValue>
Type Parameters
Name Description
TKey
TValue

ToDictionary<TKey, TValue>(IEnumerable<IGrouping<TKey, TValue>>)

Declaration
public static IDictionary<TKey, IEnumerable<TValue>> ToDictionary<TKey, TValue>(this IEnumerable<IGrouping<TKey, TValue>> grouping)
Parameters
Type Name Description
IEnumerable<IGrouping<TKey, TValue>> grouping
Returns
Type Description
IDictionary<TKey, IEnumerable<TValue>>
Type Parameters
Name Description
TKey
TValue

ToQueryString(IDictionary<string, string>)

Declaration
public static string ToQueryString(this IDictionary<string, string> dict)
Parameters
Type Name Description
IDictionary<string, string> dict
Returns
Type Description
string
In this article
Back to top Generated by DocFX