You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
426 B
15 lines
426 B
6 years ago
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace MediaBrowser.Common.Extensions
|
||
|
{
|
||
|
// The MS CollectionExtensions are only available in netcoreapp
|
||
|
public static class CollectionExtensions
|
||
|
{
|
||
|
public static TValue GetValueOrDefault<TKey, TValue> (this IReadOnlyDictionary<TKey, TValue> dictionary, TKey key)
|
||
|
{
|
||
|
dictionary.TryGetValue(key, out var ret);
|
||
|
return ret;
|
||
|
}
|
||
|
}
|
||
|
}
|