diff --git a/ICD.Common.Utils/Collections/BiDictionary.cs b/ICD.Common.Utils/Collections/BiDictionary.cs index d30326a..3467d01 100644 --- a/ICD.Common.Utils/Collections/BiDictionary.cs +++ b/ICD.Common.Utils/Collections/BiDictionary.cs @@ -30,9 +30,24 @@ namespace ICD.Common.Utils.Collections /// Constructor. /// public BiDictionary() + : this(null) + { + } + + /// + /// Constructor. + /// + /// + public BiDictionary(Dictionary dict) { m_KeyToValue = new Dictionary(); m_ValueToKey = new Dictionary(); + + if (dict == null) + return; + + foreach (KeyValuePair kvp in dict) + Add(kvp.Key, kvp.Value); } #region Methods