From ef0ed773b8ebbeae784bae1ee3b5a687660e728f Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Mon, 15 Apr 2013 16:54:57 -0400 Subject: Move installer projects to new repo --- MediaBrowser.Installer/Code/ModelExtensions.cs | 43 -------------------------- 1 file changed, 43 deletions(-) delete mode 100644 MediaBrowser.Installer/Code/ModelExtensions.cs (limited to 'MediaBrowser.Installer/Code/ModelExtensions.cs') diff --git a/MediaBrowser.Installer/Code/ModelExtensions.cs b/MediaBrowser.Installer/Code/ModelExtensions.cs deleted file mode 100644 index 66e51ec11..000000000 --- a/MediaBrowser.Installer/Code/ModelExtensions.cs +++ /dev/null @@ -1,43 +0,0 @@ - -using System.Collections.Generic; - -namespace MediaBrowser.Installer.Code -{ - /// - /// Class ModelExtensions - /// - static class ModelExtensions - { - /// - /// Values the or default. - /// - /// The STR. - /// The def. - /// System.String. - public static string ValueOrDefault(this string str, string def = "") - { - return string.IsNullOrEmpty(str) ? def : str; - } - - /// - /// Helper method for Dictionaries since they throw on not-found keys - /// - /// - /// - /// The dictionary. - /// The key. - /// The default value. - /// ``1. - public static U GetValueOrDefault(this Dictionary dictionary, T key, U defaultValue) - { - U val; - if (!dictionary.TryGetValue(key, out val)) - { - val = defaultValue; - } - return val; - - } - - } -} -- cgit v1.2.3