using System;
using System.Collections.Generic;
using JetBrains.Annotations;
namespace JetBrains.UI.Util
{
public static class CollectionEx
{
#region Operations
///
/// Returns the value associated with the key, or Null if not found.
///
[CanBeNull]
public static TValue TryGetValue([NotNull] this IDictionary dictionary, TKey key)
{
if(dictionary == null)
throw new ArgumentNullException("dictionary");
TValue value;
dictionary.TryGetValue(key, out value);
return value;
}
#endregion
}
}