diff options
Diffstat (limited to 'MediaBrowser.Common/Extensions/BaseExtensions.cs')
| -rw-r--r-- | MediaBrowser.Common/Extensions/BaseExtensions.cs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/MediaBrowser.Common/Extensions/BaseExtensions.cs b/MediaBrowser.Common/Extensions/BaseExtensions.cs index 9591862e7..b4ad90168 100644 --- a/MediaBrowser.Common/Extensions/BaseExtensions.cs +++ b/MediaBrowser.Common/Extensions/BaseExtensions.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; @@ -56,26 +54,6 @@ namespace MediaBrowser.Common.Extensions } /// <summary> - /// Helper method for Dictionaries since they throw on not-found keys - /// </summary> - /// <typeparam name="T"></typeparam> - /// <typeparam name="U"></typeparam> - /// <param name="dictionary">The dictionary.</param> - /// <param name="key">The key.</param> - /// <param name="defaultValue">The default value.</param> - /// <returns>``1.</returns> - public static U GetValueOrDefault<T, U>(this Dictionary<T, U> dictionary, T key, U defaultValue) - { - U val; - if (!dictionary.TryGetValue(key, out val)) - { - val = defaultValue; - } - return val; - - } - - /// <summary> /// Gets the attribute value. /// </summary> /// <param name="str">The STR.</param> |
