Class CollectionExtensions
Inheritance
System.Object
CollectionExtensions
Assembly: Emby.Media.Model.dll
public static class CollectionExtensions
Methods
Declaration
public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> |
dictionary |
|
TKey |
key |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Declaration
public static TValue GetValueOrDefault<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue> |
dictionary |
|
TKey |
key |
|
TValue |
defaultValue |
|
Returns
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Declaration
public static bool Remove<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, out TValue value)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue> |
dictionary |
|
TKey |
key |
|
TValue |
value |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
TKey |
|
TValue |
|
Declaration
public static bool TryAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue value)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IDictionary<TKey, TValue> |
dictionary |
|
TKey |
key |
|
TValue |
value |
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
Name |
Description |
TKey |
|
TValue |
|