/// <summary> /// Atomically adds a range of items to the map. /// </summary> /// <remarks>Null is not allowed for a Key or a Value</remarks> /// <param name="range">Range of tuples to add</param> /// <exception cref="ArgumentException">Throws ArgumentException if any of the keys already exist</exception> /// <exception cref="ArgumentNullException">Throws ArgumentNullException the keys or values are null</exception> /// <returns>New Map with the items added</returns> public static Map <K, V> addRange <K, V>(Map <K, V> map, IEnumerable <KeyValuePair <K, V> > keyValues) => map.AddRange(keyValues);