mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
15 lines
426 B
C#
15 lines
426 B
C#
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;
|
|
}
|
|
}
|
|
}
|