diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-10 11:38:23 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-04-10 11:38:23 -0400 |
| commit | 7806ccd42f0535f077ab80228e16965d2172dc8a (patch) | |
| tree | 2e821adf680485c12de43c488905f69133a58869 /MediaBrowser.Common/Extensions/BaseExtensions.cs | |
| parent | 70da0b6ae96bffbc39efab14d95b2c14426753b7 (diff) | |
resharper suggestions in common project
Diffstat (limited to 'MediaBrowser.Common/Extensions/BaseExtensions.cs')
| -rw-r--r-- | MediaBrowser.Common/Extensions/BaseExtensions.cs | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/MediaBrowser.Common/Extensions/BaseExtensions.cs b/MediaBrowser.Common/Extensions/BaseExtensions.cs index 604b2bdd2..9591862e7 100644 --- a/MediaBrowser.Common/Extensions/BaseExtensions.cs +++ b/MediaBrowser.Common/Extensions/BaseExtensions.cs @@ -12,37 +12,6 @@ namespace MediaBrowser.Common.Extensions /// </summary> public static class BaseExtensions { - /// <summary> - /// Tries the add. - /// </summary> - /// <typeparam name="TKey">The type of the T key.</typeparam> - /// <typeparam name="TValue">The type of the T value.</typeparam> - /// <param name="dictionary">The dictionary.</param> - /// <param name="key">The key.</param> - /// <param name="value">The value.</param> - /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns> - public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, TValue value) - { - if (dictionary.ContainsKey(key)) - { - return false; - } - - dictionary.Add(key, value); - return true; - } - - /// <summary> - /// Provides an additional overload for string.split - /// </summary> - /// <param name="val">The val.</param> - /// <param name="separator">The separator.</param> - /// <param name="options">The options.</param> - /// <returns>System.String[][].</returns> - public static string[] Split(this string val, char separator, StringSplitOptions options) - { - return val.Split(new[] { separator }, options); - } /// <summary> /// Strips the HTML. @@ -55,17 +24,6 @@ namespace MediaBrowser.Common.Extensions const string pattern = @"<(.|\n)*?>"; return Regex.Replace(htmlString, pattern, string.Empty).Trim(); } - - /// <summary> - /// Shuffles an IEnumerable - /// </summary> - /// <typeparam name="T"></typeparam> - /// <param name="list">The list.</param> - /// <returns>IEnumerable{``0}.</returns> - public static IEnumerable<T> Shuffle<T>(this IEnumerable<T> list) - { - return list.OrderBy(x => Guid.NewGuid()); - } /// <summary> /// Gets the M d5. |
