Exemple #1
0
        /// <summary>
        /// Add all contents of dictionary in our multi-map,
        /// replacing existing once with new onces
        /// </summary>
        /// <param name="m">Dictionary</param>
        public void AddAll(Dictionary <K, object> m)
        {
            bool multi = m is MultiMap <K>;

            if (m != null)
            {
                foreach (K item in m.Keys)
                {
                    if (multi)
                    {
                        _map.Add(item, LazyList.Clone(m[item]));
                    }
                    else
                    {
                        _map.Add(item, m[item]);
                    }
                }
            }
        }